-
Notifications
You must be signed in to change notification settings - Fork 680
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
Swap ngscheckmate/ncm to nftest #5679
Merged
Merged
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
process { | ||
withName: NGSCHECKMATE_NCM { | ||
ext.args = '-B' | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,184 @@ | ||
nextflow_process { | ||
|
||
name "Test Process NGSCHECKMATE_NCM" | ||
script "../main.nf" | ||
process "NGSCHECKMATE_NCM" | ||
config "./nextflow.config" | ||
|
||
tag "modules" | ||
tag "modules_nfcore" | ||
tag "ngscheckmate" | ||
tag "ngscheckmate/ncm" | ||
tag "bedtools/makewindows" | ||
tag "bcftools/mpileup" | ||
|
||
setup { | ||
|
||
run("BEDTOOLS_MAKEWINDOWS") { | ||
script "../../../bedtools/makewindows/main.nf" | ||
process { | ||
""" | ||
input[0] = [ [ id:'test' ], | ||
file(params.test_data['sarscov2']['genome']['test_bed'], checkIfExists: true) | ||
] | ||
""" | ||
} | ||
} | ||
|
||
run("BCFTOOLS_MPILEUP", alias: "BCFTOOLS_MPILEUP1") { | ||
script "../../../bcftools/mpileup/main.nf" | ||
process { | ||
""" | ||
input[0] = [ | ||
[ id:'test1' ], // meta map | ||
file(params.test_data['sarscov2']['illumina']['test_paired_end_sorted_bam'], checkIfExists: true), | ||
file(params.test_data['sarscov2']['genome']['test_bed'], checkIfExists: true) | ||
] | ||
input[1] = [ [ id:'sarscov2' ], | ||
file(params.test_data['sarscov2']['genome']['genome_fasta'], checkIfExists: true) | ||
] | ||
input[2] = false | ||
""" | ||
} | ||
} | ||
|
||
run("BCFTOOLS_MPILEUP", alias: "BCFTOOLS_MPILEUP2") { | ||
script "../../../bcftools/mpileup/main.nf" | ||
process { | ||
""" | ||
input[0] = [ | ||
[ id:'test2' ], // meta map | ||
file(params.test_data['sarscov2']['illumina']['test_paired_end_sorted_bam'], checkIfExists: true), | ||
file(params.test_data['sarscov2']['genome']['test_bed'], checkIfExists: true) | ||
] | ||
input[1] = [ [ id:'sarscov2' ], | ||
file(params.test_data['sarscov2']['genome']['genome_fasta'], checkIfExists: true) | ||
] | ||
input[2] = false | ||
""" | ||
} | ||
} | ||
|
||
} | ||
|
||
|
||
test("sarscov2 - bam") { | ||
config "./bam.config" | ||
when { | ||
process { | ||
""" | ||
input[0] = [ [ id: 'combined_bams' ], | ||
[file(params.test_data['sarscov2']['illumina']['test_paired_end_sorted_bam'] , checkIfExists: true ), | ||
file(params.test_data['sarscov2']['illumina']['test_paired_end_sorted_bam_bai'] , checkIfExists: true ), | ||
file(params.test_data['sarscov2']['illumina']['test_paired_end_methylated_sorted_bam'] , checkIfExists: true ), | ||
file(params.test_data['sarscov2']['illumina']['test_paired_end_methylated_sorted_bam_bai'], checkIfExists: true ) | ||
] | ||
] | ||
input[1] = BEDTOOLS_MAKEWINDOWS.out.bed | ||
input[2] = [ [ id:'sarscov2' ], | ||
file(params.test_data['sarscov2']['genome']['genome_fasta'], checkIfExists: true) | ||
] | ||
""" | ||
} | ||
} | ||
|
||
then { | ||
assertAll( | ||
{ assert process.success }, | ||
{ assert snapshot( | ||
process.out.corr_matrix, | ||
process.out.matched, | ||
process.out.all, | ||
process.out.versions | ||
).match() } | ||
) | ||
} | ||
|
||
} | ||
|
||
test("sarscov2 - vcf") { | ||
config "./vcf.config" | ||
when { | ||
process { | ||
""" | ||
input[0] = BCFTOOLS_MPILEUP1.out.vcf.combine(BCFTOOLS_MPILEUP2.out.vcf.map{it[1]}).map{meta, one, two -> [meta, [one, two]]}.map{meta, stuff -> [meta, stuff.flatten()]} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is horrific and could do with cleaning up... |
||
input[1] = BEDTOOLS_MAKEWINDOWS.out.bed | ||
input[2] = [ [ id:'sarscov2' ], | ||
file(params.test_data['sarscov2']['genome']['genome_fasta'], checkIfExists: true) | ||
] | ||
""" | ||
} | ||
} | ||
|
||
then { | ||
assertAll( | ||
{ assert process.success }, | ||
{ assert snapshot( | ||
process.out.corr_matrix, | ||
process.out.matched, | ||
process.out.all, | ||
file(process.out.pdf[0][1]).name, | ||
process.out.versions | ||
).match() } | ||
) | ||
} | ||
|
||
} | ||
|
||
test("sarscov2 - bam - stub") { | ||
|
||
options "-stub" | ||
config "./bam.config" | ||
when { | ||
process { | ||
""" | ||
input[0] = [ [ id: 'combined_bams' ], | ||
[file(params.test_data['sarscov2']['illumina']['test_paired_end_sorted_bam'] , checkIfExists: true ), | ||
file(params.test_data['sarscov2']['illumina']['test_paired_end_sorted_bam_bai'] , checkIfExists: true ), | ||
file(params.test_data['sarscov2']['illumina']['test_paired_end_methylated_sorted_bam'] , checkIfExists: true ), | ||
file(params.test_data['sarscov2']['illumina']['test_paired_end_methylated_sorted_bam_bai'], checkIfExists: true ) | ||
] | ||
] | ||
input[1] = BEDTOOLS_MAKEWINDOWS.out.bed | ||
input[2] = [ [ id:'sarscov2' ], | ||
file(params.test_data['sarscov2']['genome']['genome_fasta'], checkIfExists: true) | ||
] | ||
""" | ||
} | ||
} | ||
|
||
then { | ||
assertAll( | ||
{ assert process.success }, | ||
{ assert snapshot(process.out).match() } | ||
) | ||
} | ||
|
||
} | ||
|
||
test("sarscov2 - vcf - stub") { | ||
|
||
options "-stub" | ||
config "./vcf.config" | ||
when { | ||
process { | ||
""" | ||
input[0] = BCFTOOLS_MPILEUP1.out.vcf.combine(BCFTOOLS_MPILEUP2.out.vcf.map{it[1]}) | ||
input[1] = BEDTOOLS_MAKEWINDOWS.out.bed | ||
input[2] = [ [ id:'sarscov2' ], | ||
file(params.test_data['sarscov2']['genome']['genome_fasta'], checkIfExists: true) | ||
] | ||
""" | ||
} | ||
} | ||
|
||
then { | ||
assertAll( | ||
{ assert process.success }, | ||
{ assert snapshot(process.out).match() } | ||
) | ||
} | ||
|
||
} | ||
|
||
} |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
@SPPearce @nvnieuwk : Will that work in a pipeline where bedtools isn't installed? I'm having problems running this nf-test in Sarek where we don't have bedtools installed. The nf-test ran better after I installed bedtools in Sarek, but that doesn't seem like the right solution to me 🤔
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.
That's a good point! Maybe this is something that can be handled by
nf-core
tools (@mirpedrol)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.
Hmmm.
The alternative would be to add files to test_data instead, but there are quite a few modules that do this kind of setup block. This is essentially taking a bed file and splitting it into individual bases.
I guess BCFTOOLS_MPILEUP exists in sarek already, so you didn't have an issue with that part.
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.
BCFTOOLS_MPILEUP is installed in Sarek, so that didn't cause any issues. However, I guess the nf-test should be kind of self-contained, and not rely on what other modules might or might not be installed in the particular pipeline that is trying to use the module.
I also had to change all
params.test_data...
toparams.modules_testdata_base_path...
to get the test kind of work, that is, I managed to get 3 out of 4 "subtests" working:maxulysse/nf-core_sarek#7