forked from nf-core/modules
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
update picard/crosscheckfingerprints (nf-core#5077)
* update picard/crosscheckfingerprints * Update modules/nf-core/picard/crosscheckfingerprints/main.nf Co-authored-by: Maxime U Garcia <[email protected]> * fix linting * prettier * add input indexes --------- Co-authored-by: Maxime U Garcia <[email protected]>
- Loading branch information
Showing
10 changed files
with
182 additions
and
44 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
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
82 changes: 82 additions & 0 deletions
82
modules/nf-core/picard/crosscheckfingerprints/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,82 @@ | ||
nextflow_process { | ||
|
||
name "Test Process PICARD_CROSSCHECKFINGERPRINTS" | ||
script "../main.nf" | ||
config "./nextflow.config" | ||
|
||
process "PICARD_CROSSCHECKFINGERPRINTS" | ||
|
||
tag "modules" | ||
tag "modules_nfcore" | ||
tag "picard" | ||
tag "picard/crosscheckfingerprints" | ||
|
||
test("homo sapiens - bam - index") { | ||
when { | ||
process { | ||
""" | ||
input[0] = [ | ||
[ id:'test', single_end:false ], //meta | ||
[ | ||
file(params.test_data['homo_sapiens']['illumina']['test_paired_end_sorted_bam'], checkIfExists: true), | ||
file(params.test_data['homo_sapiens']['illumina']['test2_paired_end_sorted_bam'], checkIfExists: true) | ||
], // input1 | ||
[ | ||
file(params.test_data['homo_sapiens']['illumina']['test_paired_end_sorted_bam_bai'], checkIfExists: true), | ||
file(params.test_data['homo_sapiens']['illumina']['test2_paired_end_sorted_bam_bai'], checkIfExists: true) | ||
], // input1_index | ||
[], // input2 | ||
[], // input2_index | ||
file(params.test_data['homo_sapiens']['genome']['haplotype_map'], checkIfExists: true) // haplotype_map | ||
] | ||
input[1] = [[:],[]] | ||
""" | ||
} | ||
} | ||
|
||
then { | ||
assertAll( | ||
{ assert process.success }, | ||
{ assert snapshot(file(process.out.crosscheck_metrics[0][1]).name).match("Crosscheck - bam") }, | ||
{ assert snapshot(process.out.versions).match("Crosscheck versions - bam") } | ||
) | ||
} | ||
} | ||
|
||
test("homo sapiens - bam - stub") { | ||
|
||
options "-stub" | ||
|
||
when { | ||
process { | ||
""" | ||
input[0] = [ | ||
[ id:'test', single_end:false ], //meta | ||
[ | ||
file(params.test_data['homo_sapiens']['illumina']['test_paired_end_sorted_bam'], checkIfExists: true), | ||
file(params.test_data['homo_sapiens']['illumina']['test2_paired_end_sorted_bam'], checkIfExists: true) | ||
], // input1 | ||
[ | ||
file(params.test_data['homo_sapiens']['illumina']['test_paired_end_sorted_bam_bai'], checkIfExists: true), | ||
file(params.test_data['homo_sapiens']['illumina']['test2_paired_end_sorted_bam_bai'], checkIfExists: true) | ||
], // input1_index | ||
[], // input2 | ||
[], // input2_index | ||
file(params.test_data['homo_sapiens']['genome']['haplotype_map'], checkIfExists: true) // haplotype_map | ||
] | ||
input[1] = [[:],[]] | ||
""" | ||
} | ||
} | ||
|
||
then { | ||
assertAll( | ||
{ assert process.success }, | ||
{ assert snapshot(file(process.out.crosscheck_metrics[0][1]).name).match("Crosscheck stub") }, | ||
{ assert snapshot(process.out.versions).match("Crosscheck versions stub") } | ||
) | ||
} | ||
|
||
} | ||
|
||
} |
46 changes: 46 additions & 0 deletions
46
modules/nf-core/picard/crosscheckfingerprints/tests/main.nf.test.snap
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
3 changes: 3 additions & 0 deletions
3
modules/nf-core/picard/crosscheckfingerprints/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,3 @@ | ||
process { | ||
withName: PICARD_CROSSCHECKFINGERPRINTS {ext.args = "--EXIT_CODE_WHEN_MISMATCH 0"} | ||
} |
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,2 @@ | ||
picard/crosscheckfingerprints: | ||
- "modules/nf-core/picard/crosscheckfingerprints/**" |
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
14 changes: 0 additions & 14 deletions
14
tests/modules/nf-core/picard/crosscheckfingerprints/main.nf
This file was deleted.
Oops, something went wrong.
5 changes: 0 additions & 5 deletions
5
tests/modules/nf-core/picard/crosscheckfingerprints/nextflow.config
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.