Hi! Im currently facing an issue with nf-core mod...
# linting
n
Hi! Im currently facing an issue with nf-core modules lint running in CI: https://github.com/nf-core/modules/actions/runs/12058261501/job/33624622077?pr=7107 Im trying to push a new nf-core module called "compute_gene_scores" which contains an R script in the resources/usr/bin as detailled in https://www.nextflow.io/docs/latest/module.html#module-binaries But the CI tests are trying to run the following: nf-core modules lint compute_gene_scores/resources nf-core modules lint compute_gene_scores/nextflow.config Both of which are failing, because those are not actual modules, but files in the new module. Has anyone seen this before and could indicate what I'm doing wrong? Note: The PR includes two nf-core modules and a new subworkflow, when linting the subworkflow I get an issue where it converts underscores to forward slashes and complains that the modules are not included (the modules names are "compute_gene_scores" and "create_gene_heatmap"):
m
Cc @Sateesh_Peri if you are still around
👍 1
a
You can't have underscores in module names
You need to rename your modules to eg
COMPUTEGENESCORES
. (Yes it's ugly, yes there are better ways of doing this, no there is no active plan to change nf-core modules to allow underscores in names that I am aware of, changing it would potentially break a lot of nf-core backwards compatibility at this point and require a total tooling overhaul)
s
You can't have underscores in module names
@Arthur not sure if that is true. every tool suite with subtools will have underscores https://github.com/nf-core/methylseq/blob/d16f8f81e812d86f4d297e69de3f001628dfd5b4/modules/nf-core/bismark/methylationextractor/main.nf#L1 or did i misread you ?
the issue is with incorrect filtering
Copy code
nf-core modules lint compute_gene_scores/resources
nf-core modules lint compute_gene_scores/nextflow.config
a
the underscore between tool/subtool is rendered by the template only where the
/
would be. When I look at the PR it seems that the module folder has an underscore in it? That is not allowed
It's a bit confusing because the name of the subworkflows can have underscores. But the modules cannot. Kind of surprised
tools
doesn't throw a warning about this when you run
create
The more I look at this the more I wonder if it should be in
nf-core/modules
? The scripts are somewhat complex, in particular the one that calculates gene scores. I wonder if these would be better published into a package first? (Right now
nf-core/modules
would be the source for what seems like business logic?) But that's secondary to the issue at hand - underscores!
this 1
s
@Nicolás Alejandro Schcolnicov are you trying to modularize this nanostring pipeline ?
n
@Sateesh_Peri Yes, im trying to modularize nanostring. I'll check what you mentioned about removing underscores, thank you! @Arthur Do you think it is probably not worth adding into nf-core? I know it isn't actually a tool, but it could still be helpful for others wanting to do this same analysis.
a
I would personally suggest that for now this is better kept as a local module in
nanostring
. I would convert them to local modules which have the
nf-core/modules
format though (i.e. no underscores in name, and in their own folders with
<http://main.nf|main.nf>
,
meta.yml
etc) That way you can move them to
nf-core/modules
more easily in future if there is a desire to use them outside of
nanostring
n
Exactly my thought, that way I also don't waste the time I already invested in formatting them into nf-core standards. Thanks everyone!
a
FWIW there is a PR to address the open issue of unifying local module structure with the remote structure
❤️ 1
m
> Has anyone seen this before and could indicate what I’m doing wrong? You are not doing anything wrong. The CI is broken at the moment. I have already spent a couple of hours racking my brain over this (see the post just above yours). Edmund is thankfully working on a fix already.
❤️ 1