-
Notifications
You must be signed in to change notification settings - Fork 752
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
153 additions
and
97 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
45 changes: 45 additions & 0 deletions
45
subworkflows/nf-core/bam_split_by_region/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,45 @@ | ||
// TODO nf-core: Once you have added the required tests, please run the following command to build this file: | ||
// nf-core subworkflows test bam_split_by_region | ||
nextflow_workflow { | ||
|
||
name "Test Subworkflow BAM_SPLIT_BY_REGION" | ||
script "../main.nf" | ||
workflow "BAM_SPLIT_BY_REGION" | ||
|
||
tag "subworkflows" | ||
tag "subworkflows_nfcore" | ||
tag "subworkflows/bam_split_by_region" | ||
tag "samtools" | ||
tag "samtools/sort" | ||
tag "samtools/index" | ||
|
||
config "./nextflow.config" | ||
|
||
test("homo_sapiens - test_paired_end_markduplicates_sorted_bam") { | ||
|
||
when { | ||
workflow { | ||
""" | ||
input[0] = Channel.of([ | ||
[ id: 'test', single_end: false ], | ||
file(params.modules_testdata_base_path +'genomics/homo_sapiens/illumina/bam/test.paired_end.markduplicates.sorted.bam', checkIfExists: true), | ||
file(params.modules_testdata_base_path +'genomics/homo_sapiens/illumina/bam/test.paired_end.markduplicates.sorted.bam.bai', checkIfExists: true), | ||
file(params.modules_testdata_base_path +'genomics/homo_sapiens/genome/chr21/sequence/multi_intervals.bed', checkIfExists: true), | ||
]) | ||
""" | ||
} | ||
} | ||
|
||
then { | ||
assertAll( | ||
{ assert workflow.success }, | ||
{ assert snapshot( | ||
workflow.out.bam_bai.findAll { file(it.get(1)).name }.toSorted(), | ||
workflow.out.bam_bai.findAll { bam(it.get(1)).getReadsMD5() }.toSorted(), | ||
workflow.out.bam_bai.findAll { file(it.get(2)).name }.toSorted(), | ||
workflow.out.versions | ||
).match() } | ||
) | ||
} | ||
} | ||
} |
102 changes: 102 additions & 0 deletions
102
subworkflows/nf-core/bam_split_by_region/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,102 @@ | ||
{ | ||
"homo_sapiens - test_paired_end_markduplicates_sorted_bam": { | ||
"content": [ | ||
[ | ||
[ | ||
{ | ||
"id": "test", | ||
"single_end": false, | ||
"genomic_region": "chr21:24132499-24910998" | ||
}, | ||
"test_chr21:24132499-24910998.bam:md5,649908006f4333ef13e42313e0885d96", | ||
"test_chr21:24132499-24910998.bam.bai:md5,0d76977b2e36046cc176112776c5fa4e" | ||
], | ||
[ | ||
{ | ||
"id": "test", | ||
"single_end": false, | ||
"genomic_region": "chr21:25689497-46709983" | ||
}, | ||
"test_chr21:25689497-46709983.bam:md5,c4bc65ad94bde9cc901d33e964a977c6", | ||
"test_chr21:25689497-46709983.bam.bai:md5,834238b87a13404627fecaa1ed7ae4f4" | ||
], | ||
[ | ||
{ | ||
"id": "test", | ||
"single_end": false, | ||
"genomic_region": "chr21:1-23354000" | ||
}, | ||
"test_chr21:1-23354000.bam:md5,e17b22b80b4ba098232f12a3cb612c73", | ||
"test_chr21:1-23354000.bam.bai:md5,adbf2a0b95a947c055c219f0d950add0" | ||
] | ||
], | ||
[ | ||
[ | ||
{ | ||
"id": "test", | ||
"single_end": false, | ||
"genomic_region": "chr21:24132499-24910998" | ||
}, | ||
"test_chr21:24132499-24910998.bam:md5,649908006f4333ef13e42313e0885d96", | ||
"test_chr21:24132499-24910998.bam.bai:md5,0d76977b2e36046cc176112776c5fa4e" | ||
], | ||
[ | ||
{ | ||
"id": "test", | ||
"single_end": false, | ||
"genomic_region": "chr21:25689497-46709983" | ||
}, | ||
"test_chr21:25689497-46709983.bam:md5,c4bc65ad94bde9cc901d33e964a977c6", | ||
"test_chr21:25689497-46709983.bam.bai:md5,834238b87a13404627fecaa1ed7ae4f4" | ||
], | ||
[ | ||
{ | ||
"id": "test", | ||
"single_end": false, | ||
"genomic_region": "chr21:1-23354000" | ||
}, | ||
"test_chr21:1-23354000.bam:md5,e17b22b80b4ba098232f12a3cb612c73", | ||
"test_chr21:1-23354000.bam.bai:md5,adbf2a0b95a947c055c219f0d950add0" | ||
] | ||
], | ||
[ | ||
[ | ||
{ | ||
"id": "test", | ||
"single_end": false, | ||
"genomic_region": "chr21:24132499-24910998" | ||
}, | ||
"test_chr21:24132499-24910998.bam:md5,649908006f4333ef13e42313e0885d96", | ||
"test_chr21:24132499-24910998.bam.bai:md5,0d76977b2e36046cc176112776c5fa4e" | ||
], | ||
[ | ||
{ | ||
"id": "test", | ||
"single_end": false, | ||
"genomic_region": "chr21:25689497-46709983" | ||
}, | ||
"test_chr21:25689497-46709983.bam:md5,c4bc65ad94bde9cc901d33e964a977c6", | ||
"test_chr21:25689497-46709983.bam.bai:md5,834238b87a13404627fecaa1ed7ae4f4" | ||
], | ||
[ | ||
{ | ||
"id": "test", | ||
"single_end": false, | ||
"genomic_region": "chr21:1-23354000" | ||
}, | ||
"test_chr21:1-23354000.bam:md5,e17b22b80b4ba098232f12a3cb612c73", | ||
"test_chr21:1-23354000.bam.bai:md5,adbf2a0b95a947c055c219f0d950add0" | ||
] | ||
], | ||
[ | ||
"versions.yml:md5,022ce36c7637b4c28f9e7a3b6d788543", | ||
"versions.yml:md5,1430b8967dea6b0eb5a65313c8d81e81" | ||
] | ||
], | ||
"meta": { | ||
"nf-test": "0.9.2", | ||
"nextflow": "24.10.3" | ||
}, | ||
"timestamp": "2025-02-14T08:59:50.32521715" | ||
} | ||
} |
6 changes: 6 additions & 0 deletions
6
subworkflows/nf-core/bam_split_by_region/tests/nextflow.config
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,6 @@ | ||
process { | ||
withName: "BAM_SPLIT_BY_REGION:SAMTOOLS_VIEW" { | ||
ext.args2 = { "${meta.genomic_region}" } // Specifies the chromosome name used for splitting the input bam file. | ||
ext.prefix = { "${meta.id}_${meta.genomic_region}" } | ||
} | ||
} |
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.
15 changes: 0 additions & 15 deletions
15
tests/subworkflows/nf-core/bam_split_by_region/nextflow.config
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.