Skip to content

add anvi-gen-contigs-database module#11713

Open
telatin wants to merge 2 commits into
nf-core:masterfrom
quadram-institute-bioscience:anvi-gen-ctg
Open

add anvi-gen-contigs-database module#11713
telatin wants to merge 2 commits into
nf-core:masterfrom
quadram-institute-bioscience:anvi-gen-ctg

Conversation

@telatin
Copy link
Copy Markdown
Contributor

@telatin telatin commented May 20, 2026

  • Adding a new module for Anvi'o v9 anvi-gen-contigs-database

PR checklist

Closes #11712

  • This comment contains a description of changes (with reason).
  • If you've fixed a bug or added code that should be tested, add tests!
  • If you've added a new tool - have you followed the module conventions in the contribution docs
  • If necessary, include test data in your PR.
  • Remove all TODO statements.
  • Broadcast software version numbers to topic: versions - See version_topics
  • Follow the naming conventions.
  • Follow the parameters requirements.
  • Follow the input/output options guidelines.
  • Add a resource label
  • Use BioConda and BioContainers if possible to fulfil software requirements.
  • Ensure that the test works with either Docker / Singularity. Conda CI tests can be quite flaky:
    • For modules:
      • nf-core modules test <MODULE> --profile docker
      • nf-core modules test <MODULE> --profile singularity
      • nf-core modules test <MODULE> --profile conda
    • For subworkflows:
      • nf-core subworkflows test <SUBWORKFLOW> --profile docker
      • nf-core subworkflows test <SUBWORKFLOW> --profile singularity
      • nf-core subworkflows test <SUBWORKFLOW> --profile conda

Copy link
Copy Markdown
Contributor

@famosab famosab left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for your contribution to nf-core! We really appreciate it. I added a few comments to your PR.

@@ -0,0 +1,39 @@
process ANVIO_ANVI_GEN_CONTIGS_DATABASE {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please stick to the naming scheme described here: module specifications

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can run

nextflow lint -format -sort-declarations -spaces 4 -harshil-alignment

on this file to clean this up nicely.

--num-threads $task.cpus \\
--contigs-fasta $fasta \\
--project-name "$prefix" \\
--output-db-path ${prefix}.CONTIGS.db \\
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We want to let the module user decide about the output file naming in their pipeline via ext-prefix. So ideally the output filenames are just ${prefix}.

Comment on lines +35 to +38
{ assert process.out.contigs_db.size() == 1 },
{ assert file(process.out.contigs_db[0][1]).name == "test.CONTIGS.db" },
{ assert file(process.out.contigs_db[0][1]).length() > 0 },
{ assert snapshot(process.out.versions_anvio).match("versions") }
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we have these asswertions be part of the snapshot?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

new module: anvio/anvi-gen-contigs-database

2 participants