-
Notifications
You must be signed in to change notification settings - Fork 15
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
Nf test for everyone ! #111
Conversation
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.
Great job using the new plugins! They are really useful, especially in this pipeline.
I've left some initial comments, but, overall, instead of merging as-is, I would strongly consider submitting each module and subworkflow with their tests individually to nf-core, for a couple of reasons. First, this would ensure that the community approves the design of the new module structure, and they could also suggest additional tests. The community could take into consideration how some of these modules/subworkflows can be used in other pipelines (and therefore, which assertions would be useful), which would then translate in making each test more robust. Second, this would also ensure that we mostly have community-approved modules/subworkflows instead of local ones. I would do this before merging this PR, so that you would only have to change modules/local/
or subworkflows/local/
for the nf-core directory.
@@ -0,0 +1,97 @@ | |||
nextflow_workflow { | |||
|
|||
name "Test Subworkflow BAM_DOWNSAMPLE_SAMTOOLS" |
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 subworkflow could be of great value to the community
workflow "BAM_IMPUTE_GLIMPSE1" | ||
|
||
tag "subworkflows" | ||
tag "subworkflows_local" |
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 should update the nf-core version to match this one
} | ||
} | ||
|
||
test("Normalize vcf with computing frequencies after removing samples") { |
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.
It could be asserted that the number of samples in the final vcf is less than the original number of samples in the vcf
} | ||
} | ||
|
||
test("Normalize vcf with computing frequencies after removing samples") { |
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.
Perhaps the recalculated frequencies could also be assessed for any particular variant that changed.
{ assert snapshot(workflow.out).match() }, | ||
{ assert snapshot(workflow.out.vcf_tbi.collect{ | ||
path(it[1]).vcf.summary | ||
}).match("Concat content") |
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 could assert that the new total number of variants is the sum of the original vcfs.
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.
There is apparently already a nf-core subworkflow for this usage I will update to it.
Hi @atrigila, |
Add nf-test for all subworkflows, workflows, modules and functions.
Fix in the same time multiple imports and names.
nf-core lint
).nextflow run . -profile test,docker --outdir <OUTDIR>
).nextflow run . -profile debug,test,docker --outdir <OUTDIR>
).docs/usage.md
is updated.docs/output.md
is updated.CHANGELOG.md
is updated.README.md
is updated (including new tool citations and authors/contributors).