-
Notifications
You must be signed in to change notification settings - Fork 963
Add ViralConsensus module #9655
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
SPPearce
left a comment
There was a problem hiding this 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
| { assert process.out.fasta }, | ||
| { assert process.out.pos_counts }, | ||
| { assert process.out.ins_counts }, | ||
| { assert snapshot(process.out.versions_viralconsensus).match("optional_versions") } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are none of these files stable and able to be put into the snapshot?
SPPearce
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Comments made
| { assert snapshot( | ||
| process.out.fasta, | ||
| process.out.findAll { key, val -> key.startsWith("versions") } | ||
| ).match() } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This could probably just be
| { assert snapshot( | |
| process.out.fasta, | |
| process.out.findAll { key, val -> key.startsWith("versions") } | |
| ).match() } | |
| { assert snapshot(process.out.fasta).match() } |
i.e. you are just testing everything that is generated.
Same applies to the others too by the looks of it.
|
|
||
| input: | ||
| tuple val(meta), path(bam) | ||
| path fasta |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We generally add a meta map to the fasta, to help for pipelines that want to consider multiple genomes.
|
Thanks @SPPearce for the review(s). The latest changes are addressed, at the cost of passing linting (at least based on |
| then { | ||
| assertAll( | ||
| { assert process.success }, | ||
| { assert snapshot(process.out.fasta).match() } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Apologies, this should have been
| { assert snapshot(process.out.fasta).match() } | |
| { assert snapshot(process.out).match() } |
| then { | ||
| assertAll( | ||
| { assert process.success }, | ||
| { assert snapshot(process.out.fasta).match() } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| { assert snapshot(process.out.fasta).match() } | |
| { assert snapshot(process.out).match() } |
| [ | ||
| "VIRALCONSENSUS", | ||
| "viralconsensus", | ||
| "viral_consensus v1.0.0" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This isn't being trimmed properly, should just be 1.0.0 here.
| 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 | head -n1 | sed 's/ViralConsensus //'"), topic: versions, emit: versions_viralconsensus |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you simplify this command, combining the sed and head. AI is very good at this.
PR checklist
Closes #9653
This PR adds ViralConsensus as an nf-core/module.
topic: versions- See version_topicslabelnf-core modules test <MODULE> --profile dockernf-core modules test <MODULE> --profile singularitynf-core modules test <MODULE> --profile condanf-core subworkflows test <SUBWORKFLOW> --profile dockernf-core subworkflows test <SUBWORKFLOW> --profile singularitynf-core subworkflows test <SUBWORKFLOW> --profile conda