-
Notifications
You must be signed in to change notification settings - Fork 745
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added nf-test for biobambam/bamsormadup (#6579)
- Loading branch information
Showing
7 changed files
with
238 additions
and
56 deletions.
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
105 changes: 105 additions & 0 deletions
105
modules/nf-core/biobambam/bamsormadup/tests/main.nf.test
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,105 @@ | ||
|
||
nextflow_process { | ||
|
||
name "Test Process BIOBAMBAM_BAMSORMADUP" | ||
script "../main.nf" | ||
process "BIOBAMBAM_BAMSORMADUP" | ||
|
||
tag "modules" | ||
tag "modules_nfcore" | ||
tag "biobambam" | ||
tag "biobambam/bamsormadup" | ||
|
||
test("test-biobambam-bamsormadup-multi-input") { | ||
|
||
when { | ||
process { | ||
""" | ||
input[0] = [ | ||
[ id:'test', single_end:false ], // meta map | ||
[ | ||
file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/bam/test.paired_end.bam', checkIfExists: true), | ||
file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/bam/test.paired_end.sorted.bam', checkIfExists: true) | ||
] | ||
] | ||
input[1] = [[:],[]] | ||
""" | ||
} | ||
} | ||
|
||
then { | ||
assertAll( | ||
{ assert process.success }, | ||
{ assert snapshot( | ||
bam(process.out.bam[0][1]).getReadsMD5(), | ||
process.out.bam_index, | ||
process.out.cram, | ||
file(process.out.metrics[0][1]).readLines()[3..5], | ||
process.out.versions | ||
).match() | ||
} | ||
) | ||
} | ||
} | ||
|
||
test("test-biobambam-bamsormadup-single-input") { | ||
|
||
when { | ||
process { | ||
""" | ||
input[0] = [ | ||
[ id:'test', single_end:false ], // meta map | ||
[ | ||
file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/bam/test.paired_end.bam', checkIfExists: true) | ||
] | ||
] | ||
input[1] = [[:],[]] | ||
""" | ||
} | ||
} | ||
|
||
then { | ||
assertAll( | ||
{ assert process.success }, | ||
{ assert snapshot( | ||
bam(process.out.bam[0][1]).getReadsMD5(), | ||
process.out.bam_index, | ||
process.out.cram, | ||
file(process.out.metrics[0][1]).readLines()[3..5], | ||
process.out.versions | ||
).match() | ||
} | ||
) | ||
} | ||
} | ||
|
||
test("test-biobambam-bamsormadup-single-input-stub") { | ||
|
||
options '-stub' | ||
|
||
when { | ||
process { | ||
""" | ||
input[0] = [ | ||
[ id:'test', single_end:false ], // meta map | ||
[ | ||
file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/bam/test.paired_end.bam', checkIfExists: true) | ||
] | ||
] | ||
input[1] = [[:],[]] | ||
""" | ||
} | ||
} | ||
|
||
then { | ||
assertAll( | ||
{ assert process.success }, | ||
{ assert snapshot(process.out).match() } | ||
) | ||
} | ||
} | ||
|
||
} |
115 changes: 115 additions & 0 deletions
115
modules/nf-core/biobambam/bamsormadup/tests/main.nf.test.snap
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,115 @@ | ||
{ | ||
"test-biobambam-bamsormadup-single-input": { | ||
"content": [ | ||
"e296148e4f68882cc91fb624e392f539", | ||
[ | ||
|
||
], | ||
[ | ||
|
||
], | ||
[ | ||
"LIBRARY\tUNPAIRED_READS_EXAMINED\tREAD_PAIRS_EXAMINED\tUNMAPPED_READS\tUNPAIRED_READ_DUPLICATES\tREAD_PAIR_DUPLICATES\tREAD_PAIR_OPTICAL_DUPLICATES\tPERCENT_DUPLICATION\tESTIMATED_LIBRARY_SIZE", | ||
"lib1\t3\t97\t3\t0\t0\t0\t0\t-1", | ||
"" | ||
], | ||
[ | ||
"versions.yml:md5,67ab301f20567acd9d0e648c2a3e158c" | ||
] | ||
], | ||
"meta": { | ||
"nf-test": "0.9.0", | ||
"nextflow": "24.04.4" | ||
}, | ||
"timestamp": "2024-09-05T22:00:39.772883" | ||
}, | ||
"test-biobambam-bamsormadup-multi-input": { | ||
"content": [ | ||
"3dc03384b330e3f16e15691c9189e890", | ||
[ | ||
|
||
], | ||
[ | ||
|
||
], | ||
[ | ||
"LIBRARY\tUNPAIRED_READS_EXAMINED\tREAD_PAIRS_EXAMINED\tUNMAPPED_READS\tUNPAIRED_READ_DUPLICATES\tREAD_PAIR_DUPLICATES\tREAD_PAIR_OPTICAL_DUPLICATES\tPERCENT_DUPLICATION\tESTIMATED_LIBRARY_SIZE", | ||
"lib1\t3\t97\t3\t0\t0\t0\t0\t-1", | ||
"testN\t0\t2820\t2\t0\t828\t0\t0.293617\t3807" | ||
], | ||
[ | ||
"versions.yml:md5,67ab301f20567acd9d0e648c2a3e158c" | ||
] | ||
], | ||
"meta": { | ||
"nf-test": "0.9.0", | ||
"nextflow": "24.04.4" | ||
}, | ||
"timestamp": "2024-09-05T22:00:31.187999" | ||
}, | ||
"test-biobambam-bamsormadup-single-input-stub": { | ||
"content": [ | ||
{ | ||
"0": [ | ||
[ | ||
{ | ||
"id": "test", | ||
"single_end": false | ||
}, | ||
"test.bam:md5,d41d8cd98f00b204e9800998ecf8427e" | ||
] | ||
], | ||
"1": [ | ||
|
||
], | ||
"2": [ | ||
|
||
], | ||
"3": [ | ||
[ | ||
{ | ||
"id": "test", | ||
"single_end": false | ||
}, | ||
"test.metrics.txt:md5,d41d8cd98f00b204e9800998ecf8427e" | ||
] | ||
], | ||
"4": [ | ||
"versions.yml:md5,67ab301f20567acd9d0e648c2a3e158c" | ||
], | ||
"bam": [ | ||
[ | ||
{ | ||
"id": "test", | ||
"single_end": false | ||
}, | ||
"test.bam:md5,d41d8cd98f00b204e9800998ecf8427e" | ||
] | ||
], | ||
"bam_index": [ | ||
|
||
], | ||
"cram": [ | ||
|
||
], | ||
"metrics": [ | ||
[ | ||
{ | ||
"id": "test", | ||
"single_end": false | ||
}, | ||
"test.metrics.txt:md5,d41d8cd98f00b204e9800998ecf8427e" | ||
] | ||
], | ||
"versions": [ | ||
"versions.yml:md5,67ab301f20567acd9d0e648c2a3e158c" | ||
] | ||
} | ||
], | ||
"meta": { | ||
"nf-test": "0.9.0", | ||
"nextflow": "24.04.4" | ||
}, | ||
"timestamp": "2024-09-05T21:57:13.430982" | ||
} | ||
} |
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 was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.