-
Notifications
You must be signed in to change notification settings - Fork 695
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 gatk4/calibratedragstrmodel (#6321)
Co-authored-by: Simon Pearce <[email protected]>
- Loading branch information
Showing
6 changed files
with
215 additions
and
109 deletions.
There are no files selected for viewing
137 changes: 137 additions & 0 deletions
137
modules/nf-core/gatk4/calibratedragstrmodel/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,137 @@ | ||
|
||
nextflow_process { | ||
|
||
name "Test Process GATK4_CALIBRATEDRAGSTRMODEL" | ||
script "../main.nf" | ||
process "GATK4_CALIBRATEDRAGSTRMODEL" | ||
|
||
tag "modules" | ||
tag "modules_nfcore" | ||
tag "gatk4" | ||
tag "gatk4/calibratedragstrmodel" | ||
|
||
test("test-gatk4-calibratedragstrmodel-bam") { | ||
|
||
when { | ||
process { | ||
""" | ||
input[0] = [ | ||
[ id:'test', single_end:false ], // meta map | ||
file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/bam/test.paired_end.sorted.bam', checkIfExists: true), | ||
file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/bam/test.paired_end.sorted.bam.bai', checkIfExists: true), | ||
] | ||
input[1] = file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/genome.fasta', checkIfExists: true) | ||
input[2] = file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/genome.fasta.fai', checkIfExists: true) | ||
input[3] = file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/genome.dict', checkIfExists: true) | ||
input[4] = file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/genome_strtablefile.zip', checkIfExists: true) | ||
""" | ||
} | ||
} | ||
|
||
then { | ||
assertAll( | ||
{ assert process.success }, | ||
{ assert snapshot( | ||
file(process.out.dragstr_model[0][1]).readLines()[3..7], | ||
process.out.versions | ||
).match() | ||
} | ||
) | ||
} | ||
} | ||
|
||
test("test-gatk4-calibratedragstrmodel-cram") { | ||
|
||
when { | ||
process { | ||
""" | ||
input[0] = [ | ||
[ id:'test', single_end:false ], // meta map | ||
file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/cram/test.paired_end.sorted.cram', checkIfExists: true), | ||
file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/cram/test.paired_end.sorted.cram.crai', checkIfExists: true), | ||
] | ||
input[1] = file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/genome.fasta', checkIfExists: true) | ||
input[2] = file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/genome.fasta.fai', checkIfExists: true) | ||
input[3] = file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/genome.dict', checkIfExists: true) | ||
input[4] = file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/genome_strtablefile.zip', checkIfExists: true) | ||
""" | ||
} | ||
} | ||
|
||
then { | ||
assertAll( | ||
{ assert process.success }, | ||
{ assert snapshot( | ||
file(process.out.dragstr_model[0][1]).readLines()[3..7], | ||
process.out.versions | ||
).match() | ||
} | ||
) | ||
} | ||
} | ||
|
||
test("test-gatk4-calibratedragstrmodel-beds") { | ||
|
||
when { | ||
process { | ||
""" | ||
input[0] = [ | ||
[ id:'test', single_end:false ], // meta map | ||
file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/cram/test.paired_end.sorted.cram', checkIfExists: true), | ||
file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/cram/test.paired_end.sorted.cram.crai', checkIfExists: true), | ||
] | ||
input[1] = file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/genome.fasta', checkIfExists: true) | ||
input[2] = file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/genome.fasta.fai', checkIfExists: true) | ||
input[3] = file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/genome.dict', checkIfExists: true) | ||
input[4] = file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/genome_strtablefile.zip', checkIfExists: true) | ||
""" | ||
} | ||
} | ||
|
||
then { | ||
assertAll( | ||
{ assert process.success }, | ||
{ assert snapshot( | ||
file(process.out.dragstr_model[0][1]).readLines()[3..7], | ||
process.out.versions | ||
).match() | ||
} | ||
) | ||
} | ||
} | ||
|
||
test("test-gatk4-calibratedragstrmodel-gzipped-beds") { | ||
|
||
when { | ||
process { | ||
""" | ||
input[0] = [ | ||
[ id:'test', single_end:false ], // meta map | ||
file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/cram/test.paired_end.sorted.cram', checkIfExists: true), | ||
file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/cram/test.paired_end.sorted.cram.crai', checkIfExists: true), | ||
] | ||
input[1] = file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/genome.fasta', checkIfExists: true) | ||
input[2] = file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/genome.fasta.fai', checkIfExists: true) | ||
input[3] = file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/genome.dict', checkIfExists: true) | ||
input[4] = file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/genome_strtablefile.zip', checkIfExists: true) | ||
""" | ||
} | ||
} | ||
|
||
then { | ||
assertAll( | ||
{ assert process.success }, | ||
{ assert snapshot( | ||
file(process.out.dragstr_model[0][1]).readLines()[3..7], | ||
process.out.versions | ||
).match() | ||
} | ||
) | ||
} | ||
} | ||
|
||
} |
78 changes: 78 additions & 0 deletions
78
modules/nf-core/gatk4/calibratedragstrmodel/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,78 @@ | ||
{ | ||
"test-gatk4-calibratedragstrmodel-bam": { | ||
"content": [ | ||
[ | ||
"# sample = testN", | ||
"# readGroups = 1", | ||
"# estimatedOrDefaults = defaults", | ||
"# commandLine = CalibrateDragstrModel --str-table-path genome_strtablefile.zip --threads 2 --output test.txt --input test.paired_end.sorted.bam --reference genome.fasta --tmp-dir . --gp-values 10:1.0:50 --api-values 0:1.0:40 --gop-values 10:.25:50 --het-to-hom-ratio 2.0 --min-loci-count 50 --api-mono-threshold 3 --max-period 8 --max-repeats 20 --minimum-depth 10 --pileup-padding 5 --sampling-min-mq 20 --parallel false --shard-size 1000000 --down-sample-size 4096 --force-estimation false --interval-set-rule UNION --interval-padding 0 --interval-exclusion-padding 0 --interval-merging-rule ALL --read-validation-stringency SILENT --seconds-between-progress-updates 10.0 --disable-sequence-dictionary-validation false --create-output-bam-index true --create-output-bam-md5 false --create-output-variant-index true --create-output-variant-md5 false --max-variants-per-shard 0 --lenient false --add-output-sam-program-record true --add-output-vcf-command-line true --cloud-prefetch-buffer 40 --cloud-index-prefetch-buffer -1 --disable-bam-index-caching false --sites-only-vcf-output false --help false --version false --showHidden false --verbosity INFO --QUIET false --use-jdk-deflater false --use-jdk-inflater false --gcs-max-retries 20 --gcs-project-for-requester-pays --disable-tool-default-read-filters false", | ||
"############################################################################################" | ||
], | ||
[ | ||
"versions.yml:md5,3a652afb9cc9fca4e162ec205406b368" | ||
] | ||
], | ||
"meta": { | ||
"nf-test": "0.8.4", | ||
"nextflow": "24.04.4" | ||
}, | ||
"timestamp": "2024-08-26T13:22:17.584362" | ||
}, | ||
"test-gatk4-calibratedragstrmodel-cram": { | ||
"content": [ | ||
[ | ||
"# sample = testN", | ||
"# readGroups = 1", | ||
"# estimatedOrDefaults = defaults", | ||
"# commandLine = CalibrateDragstrModel --str-table-path genome_strtablefile.zip --threads 2 --output test.txt --input test.paired_end.sorted.cram --reference genome.fasta --tmp-dir . --gp-values 10:1.0:50 --api-values 0:1.0:40 --gop-values 10:.25:50 --het-to-hom-ratio 2.0 --min-loci-count 50 --api-mono-threshold 3 --max-period 8 --max-repeats 20 --minimum-depth 10 --pileup-padding 5 --sampling-min-mq 20 --parallel false --shard-size 1000000 --down-sample-size 4096 --force-estimation false --interval-set-rule UNION --interval-padding 0 --interval-exclusion-padding 0 --interval-merging-rule ALL --read-validation-stringency SILENT --seconds-between-progress-updates 10.0 --disable-sequence-dictionary-validation false --create-output-bam-index true --create-output-bam-md5 false --create-output-variant-index true --create-output-variant-md5 false --max-variants-per-shard 0 --lenient false --add-output-sam-program-record true --add-output-vcf-command-line true --cloud-prefetch-buffer 40 --cloud-index-prefetch-buffer -1 --disable-bam-index-caching false --sites-only-vcf-output false --help false --version false --showHidden false --verbosity INFO --QUIET false --use-jdk-deflater false --use-jdk-inflater false --gcs-max-retries 20 --gcs-project-for-requester-pays --disable-tool-default-read-filters false", | ||
"############################################################################################" | ||
], | ||
[ | ||
"versions.yml:md5,3a652afb9cc9fca4e162ec205406b368" | ||
] | ||
], | ||
"meta": { | ||
"nf-test": "0.8.4", | ||
"nextflow": "24.04.4" | ||
}, | ||
"timestamp": "2024-08-26T13:22:30.21551" | ||
}, | ||
"test-gatk4-calibratedragstrmodel-gzipped-beds": { | ||
"content": [ | ||
[ | ||
"# sample = testN", | ||
"# readGroups = 1", | ||
"# estimatedOrDefaults = defaults", | ||
"# commandLine = CalibrateDragstrModel --str-table-path genome_strtablefile.zip --threads 2 --output test.txt --input test.paired_end.sorted.cram --reference genome.fasta --tmp-dir . --gp-values 10:1.0:50 --api-values 0:1.0:40 --gop-values 10:.25:50 --het-to-hom-ratio 2.0 --min-loci-count 50 --api-mono-threshold 3 --max-period 8 --max-repeats 20 --minimum-depth 10 --pileup-padding 5 --sampling-min-mq 20 --parallel false --shard-size 1000000 --down-sample-size 4096 --force-estimation false --interval-set-rule UNION --interval-padding 0 --interval-exclusion-padding 0 --interval-merging-rule ALL --read-validation-stringency SILENT --seconds-between-progress-updates 10.0 --disable-sequence-dictionary-validation false --create-output-bam-index true --create-output-bam-md5 false --create-output-variant-index true --create-output-variant-md5 false --max-variants-per-shard 0 --lenient false --add-output-sam-program-record true --add-output-vcf-command-line true --cloud-prefetch-buffer 40 --cloud-index-prefetch-buffer -1 --disable-bam-index-caching false --sites-only-vcf-output false --help false --version false --showHidden false --verbosity INFO --QUIET false --use-jdk-deflater false --use-jdk-inflater false --gcs-max-retries 20 --gcs-project-for-requester-pays --disable-tool-default-read-filters false", | ||
"############################################################################################" | ||
], | ||
[ | ||
"versions.yml:md5,3a652afb9cc9fca4e162ec205406b368" | ||
] | ||
], | ||
"meta": { | ||
"nf-test": "0.8.4", | ||
"nextflow": "24.04.4" | ||
}, | ||
"timestamp": "2024-08-26T13:22:53.619871" | ||
}, | ||
"test-gatk4-calibratedragstrmodel-beds": { | ||
"content": [ | ||
[ | ||
"# sample = testN", | ||
"# readGroups = 1", | ||
"# estimatedOrDefaults = defaults", | ||
"# commandLine = CalibrateDragstrModel --str-table-path genome_strtablefile.zip --threads 2 --output test.txt --input test.paired_end.sorted.cram --reference genome.fasta --tmp-dir . --gp-values 10:1.0:50 --api-values 0:1.0:40 --gop-values 10:.25:50 --het-to-hom-ratio 2.0 --min-loci-count 50 --api-mono-threshold 3 --max-period 8 --max-repeats 20 --minimum-depth 10 --pileup-padding 5 --sampling-min-mq 20 --parallel false --shard-size 1000000 --down-sample-size 4096 --force-estimation false --interval-set-rule UNION --interval-padding 0 --interval-exclusion-padding 0 --interval-merging-rule ALL --read-validation-stringency SILENT --seconds-between-progress-updates 10.0 --disable-sequence-dictionary-validation false --create-output-bam-index true --create-output-bam-md5 false --create-output-variant-index true --create-output-variant-md5 false --max-variants-per-shard 0 --lenient false --add-output-sam-program-record true --add-output-vcf-command-line true --cloud-prefetch-buffer 40 --cloud-index-prefetch-buffer -1 --disable-bam-index-caching false --sites-only-vcf-output false --help false --version false --showHidden false --verbosity INFO --QUIET false --use-jdk-deflater false --use-jdk-inflater false --gcs-max-retries 20 --gcs-project-for-requester-pays --disable-tool-default-read-filters false", | ||
"############################################################################################" | ||
], | ||
[ | ||
"versions.yml:md5,3a652afb9cc9fca4e162ec205406b368" | ||
] | ||
], | ||
"meta": { | ||
"nf-test": "0.8.4", | ||
"nextflow": "24.04.4" | ||
}, | ||
"timestamp": "2024-08-26T13:22:41.938548" | ||
} | ||
} |
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.
5 changes: 0 additions & 5 deletions
5
tests/modules/nf-core/gatk4/calibratedragstrmodel/nextflow.config
This file was deleted.
Oops, something went wrong.
19 changes: 0 additions & 19 deletions
19
tests/modules/nf-core/gatk4/calibratedragstrmodel/test.yml
This file was deleted.
Oops, something went wrong.