Skip to content

Add ViralConsensus module#9655

Merged
SPPearce merged 9 commits intonf-core:masterfrom
lucaspatel:new-module-viralconsensus
Mar 17, 2026
Merged

Add ViralConsensus module#9655
SPPearce merged 9 commits intonf-core:masterfrom
lucaspatel:new-module-viralconsensus

Conversation

@lucaspatel
Copy link
Contributor

PR checklist

Closes #9653

This PR adds ViralConsensus as an nf-core/module.

  • 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
Contributor

@SPPearce SPPearce left a comment

Choose a reason for hiding this comment

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

Can you take a look at:
https://nf-co.re/docs/guidelines/components/modules#configuration-of-extargs-in-tests
and configure the ext.args that way please.
Or if they are all the same after you change the ext., then I guess just have the one nextflow.config

Copy link
Contributor

@SPPearce SPPearce left a comment

Choose a reason for hiding this comment

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

Comments made

@lucaspatel
Copy link
Contributor Author

Thanks @SPPearce for the review(s). The latest changes are addressed, at the cost of passing linting (at least based on nf-core modules lint locally, unsure about the CI yet).

@lucaspatel lucaspatel requested a review from SPPearce February 16, 2026 18:20
tuple val(meta), path("*.consensus.fa"), emit: fasta
tuple val(meta), path("*.pos_counts.tsv"), optional: true, emit: pos_counts
tuple val(meta), path("*.ins_counts.json"), optional: true, emit: ins_counts
tuple val("${task.process}"), val('viralconsensus'), eval("viral_consensus --version 2>&1 | sed 's/.*v//'"), topic: versions, emit: versions_viralconsensus
Copy link
Contributor

Choose a reason for hiding this comment

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

Have you checked if the 2>&1 is required? Depends on whether the tool writes to stdout or stderr.

Copy link
Contributor

@SPPearce SPPearce left a comment

Choose a reason for hiding this comment

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

Can you just check if it works without the 2>&1, but otherwise looks good.

@lucaspatel lucaspatel force-pushed the new-module-viralconsensus branch from 956561b to 23c571d Compare March 10, 2026 22:01
@lucaspatel
Copy link
Contributor Author

@SPPearce Sorry for the history rewrite but I've completed your request. No difference as far as I can tell.

@SPPearce
Copy link
Contributor

@lucaspatel , you should ask on the nf-core Slack channel to join the organisation, so the tests run for you.

@SPPearce SPPearce enabled auto-merge March 17, 2026 08:52
@SPPearce SPPearce added this pull request to the merge queue Mar 17, 2026
Merged via the queue into nf-core:master with commit e4db477 Mar 17, 2026
28 checks passed
ctuni pushed a commit to ctuni/modules that referenced this pull request Mar 17, 2026
* feat: Added ViralConsensus module

* fix: update test snapshots for Docker compatibility

* fix: task.ext to optional inputs

* fix: update configuration of ext.args in tests

* fix: simplify test asserts, though breaks linting

* fix: add meta map to fasta input

* fix: tests match and sed/head handling

* chore: remove shell redirect
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

new module: ViralConsensus

2 participants