Hi, this seems to be a basic question, but I creat...
# help
s
Hi, this seems to be a basic question, but I created this cheatsheet to create module and run tests using nf-core schema. can you please review and confirm it is accurate? This will help a lot in my development. nf-test 0.9.5 and nextflow 26.04 are the versions i am planning to use
❤️ 1
i
Nice! A few comments, though: 1. The nf-core template and the nf-core modules repo have the nf-test boilerplate, so there is no need to run
nf-test init
2. If a test with snapshots has never been run, nf-test will record the snapshot even without
--update-snapshot
3. In the nf-core context specifically, modules must define both conda and container directives, unless the tool is categorically incompatible with Conda 4. There is no need to inject
docker.enabled
or
conda.enabled
in the module-level test config, nf-test deals with this when you pass a profile 5. Precedence of container tools should not matter, since good practice is to enable exactly one in a given run 6. You have not mentioned Singularity/Apptainer, it is an important tool when developing/running in HPC environments 7. The nf-core and nf-test logos are wrong, you can find the correct nf-core logo here
s
ok. thanks for sharing your thoughts
does this look better?
i
You colud also mention the
--dry-run
flag, it allows you to list the tests a command would run without actually running them (useful for checking that your command won't catch too many tests)
👍 1
s
I am planning for my work, and full pipeline may be released after i create a request in new pipelines and it gets approved
i
Nice work, looks better now
Good luck with the pipeline!
s
Thank you 🙂
a
I love it! "for faster local development, conda is usually preferred" <- I disagree with this, Conda is slooowwwwww. It's better with Mamba but still fairly slow.
👍 2
s
K thought docker would be faster. Solving env takes too long in conda.
m
@Sreeram Chandra Murthy Peela It’s looking good already. Did you make this with NotebookLM ? I would change the following: • in nf-core, the conda packages are defined in
environment.yml
, not in
<http://main.nf|main.nf>
• you reuse the same container example for Docker and Singularity. For Singularity I would rather use a
.sif
file from galaxy/biocontainers • in nf-core you don’t need to define profile/container/conda in
tests/nextflow.config
. It all comes automatically through the repo • when running nf-test, I took the habit of adding profiles e.g.
--profile=+conda
, because pipeline tests often start with the
test
profile and
--profile conda
would otherwise erase that • Is there really
.nf-test.config
in module directories ?
s
@Matthieu Muffato Hi, I used a ChatGPT prompt and instructions to create this. Thanks for your suggestions, I greatly appreciate it. Basically, it is a small version of how to build locally. I am planning it to be a part of the pipeline. This is just meant to outline the key ideas in building modules in nf-core format (though a lot of things need to be changed).