Hello everybody, I am trying to understand the gff...
# modules
f
Hello everybody, I am trying to understand the gffread module. Can anyone explain why the
prefix
variable is empty if
task.ext.prefix
is defined? What's the point of having
null.gtf
as output? https://github.com/nf-core/modules/blob/ba85edc3a62136980a647338558c402f67487430/modules/nf-core/gffread/main.nf#L25
m
What you’re seeing is an elvis operator. It means prefix ==
task.ext.prefix
if it exists, else it’s
${meta.id}
It’s there to make sure
prefix
is never
null
elvis
aaw yeah 2
f
Thanks! I am very new to Groovy and learning while doing 😅 So, I am working on nf-core/chipseq, specifically on the
prepare_genome
subworkflow: `modules.config` does not set `ext.prefix` for GFFREAD and, in `prepare_genome.ng`, the input channel does not define `meta.id` . This results in the output file name to be
null.gtf
. Which may be fine. Is the simple fix to explicit
ext.prefix
in
modules.config
to something fixed (e.g.
genes
), or should I implement some logic to get the actual name from the input gff? • https://github.com/nf-core/chipseq/blob/76e2382b6d443db4dc2396e6831d1243256d80b0/conf/modules.config#L71 • https://github.com/nf-core/chipseq/blob/76e2382b6d443db4dc2396e6831d1243256d80b0/subworkflows/local/prepare_genome.nf#L75
m
I’d try to extrapolate a
meta.id
from the gff file
but perhaps it’s best to ask in #chipseq what the dev’s there would like best
f
Sure! Thanks for the quick answer though 😄
m
no problem!
m
@Francesco Tabaro, @Pieter Moris reported in #rnaseq following your post here. I think I have a solution: https://nfcore.slack.com/archives/CE8SSJV3N/p1733413929577959?thread_ts=1733413515.870789&cid=CE8SSJV3N
f
Hi @Maxime Garcia, yes that is how I am proposing to fix in nf-core/chipseq. I messed up during PR review and accidentally deleted the line. My new PR looks like this https://github.com/nf-core/chipseq/pull/437
🎉 1
m
my comment was more about adding an id on the meta map
f
I solved it in a similar way but that was reject during code review. https://github.com/nf-core/chipseq/pull/435/commits/4aa51fe6bc24a112773b06b5db52342931ed8f7c
confused dog 1