Something that threw me for a spin when creating a...
# tools
a
Something that threw me for a spin when creating a new local module using the
nf-core module create
was this line:
Copy code
output:
    tuple val(meta), path("${prefix}.perfile.tsv"),     optional:true, emit: summary

    script:
    ...
    def prefix = task.ext.prefix ?: "${meta.id}"
The linter was correctly showing an error. After staring at it for a while and asking for help someone spotted the
def
keyword which defines a local variable, eg only available in
script
block. For a noob like me I thought the a nextflow
process
would be all within a single scope. But actually there are supposedly 5 different blocks! I think adding a comment in the template might be helpful. Not sure what others thing?
j
Ehh I dunno: this sounds like more core nextflow behaviour rather than nf-core specific..
s
Yes, but it is very unintuitive
And definitely trips people up regularly
So I would support adding a comment to the template
j
Fair enough, that's good enough data for me @Simon Pearce!
Wanna make an RFC? 😉
(just kidding, I think direct PR to template would be sufficient)
🙌 1
s
@Ammar Aziz, how do you feel about making a PR to the template?
a
Happy to do that! I wanted to float the idea first before going ahead with it
s
Great, well volunteered
👍 1
a
Happy to contribute! Call on me any time you want a noobs eyes 🙂
s
Don't think you are a noob, I've definitely seen you around for a while
❤️ 1
a
Appreciate the kind words but the mistakes I make are fully noobish (for nextflow), I am improving!
Im rapidly learning nextflow and nf-core framework, really enjoying it even though some things are frustrating me (with nextflow specifically)