Skip to content

Commit

Permalink
Update GATK4_HAPLOTYPECALLER module (#4594)
Browse files Browse the repository at this point in the history
* add a meta to all input files

* update tests to include extra metas

* update meta.yml

* add nf-tests

* migrate to nf-tests

* remove old pytest

* Informative names to metas. fix example metas in meta.yml

* assert versions.yml md5sum

* rename metas

* unique names for snapshots
  • Loading branch information
TCLamnidis authored Feb 20, 2024
1 parent 9cb9e6b commit 9171c29
Show file tree
Hide file tree
Showing 3 changed files with 135 additions and 25 deletions.
10 changes: 5 additions & 5 deletions modules/nf-core/gatk4/haplotypecaller/meta.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ input:
type: map
description: |
Groovy Map containing reference information
e.g. [ id:'test', single_end:false ]
e.g. [ id:'test_reference' ]
- fasta:
type: file
description: The reference fasta file
Expand All @@ -48,7 +48,7 @@ input:
type: map
description: |
Groovy Map containing reference information
e.g. [ id:'test', single_end:false ]
e.g. [ id:'test_reference' ]
- fai:
type: file
description: Index of reference fasta file
Expand All @@ -57,7 +57,7 @@ input:
type: map
description: |
Groovy Map containing reference information
e.g. [ id:'test', single_end:false ]
e.g. [ id:'test_reference' ]
- dict:
type: file
description: GATK sequence dictionary
Expand All @@ -66,15 +66,15 @@ input:
type: map
description: |
Groovy Map containing dbsnp information
e.g. [ id:'test', single_end:false ]
e.g. [ id:'test_dbsnp' ]
- dbsnp:
type: file
description: VCF file containing known sites (optional)
- meta6:
type: map
description: |
Groovy Map containing dbsnp information
e.g. [ id:'test', single_end:false ]
e.g. [ id:'test_dbsnp' ]
- dbsnp_tbi:
type: file
description: VCF index of dbsnp (optional)
Expand Down
24 changes: 12 additions & 12 deletions modules/nf-core/gatk4/haplotypecaller/tests/main.nf.test
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,9 @@ nextflow_process {
assertAll(
{ assert process.success },
// { assert snapshot(process.out).match() }, // Unstable hashes
{ assert snapshot(file(process.out.vcf.get(0).get(1)).name).match("output/gatk4/test.vcf.gz") },
{ assert snapshot(file(process.out.tbi.get(0).get(1)).name).match("output/gatk4/test.vcf.gz.tbi") },
{ assert snapshot(file(process.out.versions.get(0)).name).match("output/gatk4/versions.yml") },
{ assert snapshot(file(process.out.vcf.get(0).get(1)).name).match("gatk_hc_vcf_bam_input") },
{ assert snapshot(file(process.out.tbi.get(0).get(1)).name).match("gatk_hc_vcf_tbi_bam_input") },
{ assert snapshot(process.out.versions).match("gatk_hc_versions_bam_input") },
)
}

Expand Down Expand Up @@ -69,9 +69,9 @@ nextflow_process {
assertAll(
{ assert process.success },
// { assert snapshot(process.out).match() }, // Unstable hashes
{ assert snapshot(file(process.out.vcf.get(0).get(1)).name).match("output/gatk4/test.vcf.gz") },
{ assert snapshot(file(process.out.tbi.get(0).get(1)).name).match("output/gatk4/test.vcf.gz.tbi") },
{ assert snapshot(file(process.out.versions.get(0)).name).match("output/gatk4/versions.yml") },
{ assert snapshot(file(process.out.vcf.get(0).get(1)).name).match("gatk_hc_vcf_cram_input") },
{ assert snapshot(file(process.out.tbi.get(0).get(1)).name).match("gatk_hc_vcf_tbi_cram_input") },
{ assert snapshot(process.out.versions).match("gatk_hc_versions_cram_input") },
)
}

Expand Down Expand Up @@ -102,9 +102,9 @@ nextflow_process {
assertAll(
{ assert process.success },
// { assert snapshot(process.out).match() }, // Unstable hashes
{ assert snapshot(file(process.out.vcf.get(0).get(1)).name).match("output/gatk4/test.vcf.gz") },
{ assert snapshot(file(process.out.tbi.get(0).get(1)).name).match("output/gatk4/test.vcf.gz.tbi") },
{ assert snapshot(file(process.out.versions.get(0)).name).match("output/gatk4/versions.yml") },
{ assert snapshot(file(process.out.vcf.get(0).get(1)).name).match("gatk_hc_vcf_cram_input_with_sites") },
{ assert snapshot(file(process.out.tbi.get(0).get(1)).name).match("gatk_hc_vcf_tbi_cram_input_with_sites") },
{ assert snapshot(process.out.versions).match("gatk_hc_versions_cram_input_with_sites") },
)
}

Expand Down Expand Up @@ -135,9 +135,9 @@ nextflow_process {
assertAll(
{ assert process.success },
// { assert snapshot(process.out).match() }, // Unstable hashes
{ assert snapshot(file(process.out.vcf.get(0).get(1)).name).match("output/gatk4/test.vcf.gz") },
{ assert snapshot(file(process.out.tbi.get(0).get(1)).name).match("output/gatk4/test.vcf.gz.tbi") },
{ assert snapshot(file(process.out.versions.get(0)).name).match("output/gatk4/versions.yml") },
{ assert snapshot(file(process.out.vcf.get(0).get(1)).name).match("gatk_hc_vcf_cram_dragstr_input_with_sites") },
{ assert snapshot(file(process.out.tbi.get(0).get(1)).name).match("gatk_hc_vcf_tbi_cram_dragstr_input_with_sites") },
{ assert snapshot(process.out.versions).match("gatk_hc_versions_cram_dragstr_input_with_sites") },
)
}

Expand Down
126 changes: 118 additions & 8 deletions modules/nf-core/gatk4/haplotypecaller/tests/main.nf.test.snap

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 9171c29

Please sign in to comment.