Hi, I’m adding a new nf-core module that uses an ...
# modules
s
Hi, I’m adding a new nf-core module that uses an R package template: https://github.com/saraamenasantamaria/modules/tree/add-updhmm-vcfcheck-module/modules/nf-core/updhmm/vcfcheck A few days ago, I asked about how to add topics. Since this module was included in a pipeline for testing, I ran lint locally from there and it passed without errors. However, running lint now from modules/nf-core produces an error related to the topics. I’ve checked the documentation and implemented it as I understood, but I’m not sure how to handle this correctly so that it passes all lint checks. Thanks for your help!
n
essentiall what you need instead of:
path "versions.yml", emit: versions, topic: versions
is:
tuple val("${task.process}), val(bioconductor-updhmm), eval("Rscript -e 'library(UPDhmm); cat(as.character(packageVersion('UPDhmm')))") topic:versions emit: versions_updhmm
but maybe you need to fix the quoting in the eval
s
The problem is that if I use
eval
, I get an error because it cannot be used with an R script.
And it looks like the tests passed
s
But it uses a Bash script, not an R template. It runs R commands from Bash. However, my code is longer, and for that the documentation recommends using templates.
My module is like
modules/nf-core/limma/differential/main.nf
.
But if I don’t write it like this:
tuple val("${task.process}"), val(bioconductor-updhmm), eval("Rscript -e 'library(UPDhmm); cat(as.character(packageVersion('UPDhmm')))")") topic:versions emit: versions_updhmm
the linter doesn’t pass, and if I do write it like that, then the test doesn’t pass.