Skip to content

Commit

Permalink
Add assertions
Browse files Browse the repository at this point in the history
  • Loading branch information
LouisLeNezet committed Jul 22, 2024
1 parent 1640818 commit 3f637d7
Show file tree
Hide file tree
Showing 6 changed files with 46 additions and 37 deletions.
5 changes: 4 additions & 1 deletion subworkflows/local/vcf_normalize_bcftools/tests/main.nf.test
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,10 @@ nextflow_workflow {
{ assert snapshot(workflow.out.vcf_tbi.collect{
path(it[1]).vcf.summary
}).match("Normalize content")
}
},
{ workflow.out.vcf_tbi.collect{
assert path(it[1]).vcf.variantCount == path(it[1]).vcf.noSnps
}}
)
}
}
Expand Down
36 changes: 18 additions & 18 deletions subworkflows/local/vcf_normalize_bcftools/tests/main.nf.test.snap
Original file line number Diff line number Diff line change
Expand Up @@ -21,16 +21,16 @@
"id": "1000GP",
"chr": "chr21"
},
"1000GP_chr21_fixed.vcf.gz:md5,13631f70edf3c9e18ca2215d5d277dc5",
"1000GP_chr21_fixed.vcf.gz.tbi:md5,794ad7840412048e8f21eb56ab2755e2"
"1000GP_chr21_fixed.vcf.gz:md5,07239edd29a6c5a8ca1c3226d0f83de5",
"1000GP_chr21_fixed.vcf.gz.tbi:md5,388eefaf444c084970d27dff0478b212"
],
[
{
"id": "1000GP",
"chr": "chr22"
},
"1000GP_chr22_fixed.vcf.gz:md5,21d8b33f981bc6f146ba036ac23007d0",
"1000GP_chr22_fixed.vcf.gz.tbi:md5,3fb30aa704a97e35898a7a281d18ab29"
"1000GP_chr22_fixed.vcf.gz:md5,5d4579b182241f5aa812206ac81835d7",
"1000GP_chr22_fixed.vcf.gz.tbi:md5,9088246d10963b3cd8704715dc09c436"
]
],
"1": [
Expand All @@ -49,16 +49,16 @@
"id": "1000GP",
"chr": "chr21"
},
"1000GP_chr21_fixed.vcf.gz:md5,13631f70edf3c9e18ca2215d5d277dc5",
"1000GP_chr21_fixed.vcf.gz.tbi:md5,794ad7840412048e8f21eb56ab2755e2"
"1000GP_chr21_fixed.vcf.gz:md5,07239edd29a6c5a8ca1c3226d0f83de5",
"1000GP_chr21_fixed.vcf.gz.tbi:md5,388eefaf444c084970d27dff0478b212"
],
[
{
"id": "1000GP",
"chr": "chr22"
},
"1000GP_chr22_fixed.vcf.gz:md5,21d8b33f981bc6f146ba036ac23007d0",
"1000GP_chr22_fixed.vcf.gz.tbi:md5,3fb30aa704a97e35898a7a281d18ab29"
"1000GP_chr22_fixed.vcf.gz:md5,5d4579b182241f5aa812206ac81835d7",
"1000GP_chr22_fixed.vcf.gz.tbi:md5,9088246d10963b3cd8704715dc09c436"
]
],
"versions": [
Expand All @@ -77,7 +77,7 @@
"nf-test": "0.8.4",
"nextflow": "23.10.1"
},
"timestamp": "2024-07-18T15:23:32.248285219"
"timestamp": "2024-07-22T15:51:30.725699084"
},
"Norm content recomputed": {
"content": [
Expand All @@ -101,16 +101,16 @@
"id": "1000GP",
"chr": "chr21"
},
"1000GP_chr21_biallelic_snps.vcf.gz:md5,f5f4f04327ba945ee931c994c0d3b378",
"1000GP_chr21_biallelic_snps.vcf.gz.tbi:md5,faefe7777f370473a9a15682811e06ca"
"1000GP_chr21_biallelic_snps.vcf.gz:md5,17746c80b9e02787f4cb950a3c2efa93",
"1000GP_chr21_biallelic_snps.vcf.gz.tbi:md5,006d0bec1050410aa64d427e2fad42e2"
],
[
{
"id": "1000GP",
"chr": "chr22"
},
"1000GP_chr22_biallelic_snps.vcf.gz:md5,604930983c16df53c3560736b28cc653",
"1000GP_chr22_biallelic_snps.vcf.gz.tbi:md5,9e71ab3c0ead3ea55de972a5c2bc6bcb"
"1000GP_chr22_biallelic_snps.vcf.gz:md5,817ebeceadcaea1e95f92c7b67659f28",
"1000GP_chr22_biallelic_snps.vcf.gz.tbi:md5,d3460d21cacfbb15b34289454e2922a8"
]
],
"1": [
Expand All @@ -125,16 +125,16 @@
"id": "1000GP",
"chr": "chr21"
},
"1000GP_chr21_biallelic_snps.vcf.gz:md5,f5f4f04327ba945ee931c994c0d3b378",
"1000GP_chr21_biallelic_snps.vcf.gz.tbi:md5,faefe7777f370473a9a15682811e06ca"
"1000GP_chr21_biallelic_snps.vcf.gz:md5,17746c80b9e02787f4cb950a3c2efa93",
"1000GP_chr21_biallelic_snps.vcf.gz.tbi:md5,006d0bec1050410aa64d427e2fad42e2"
],
[
{
"id": "1000GP",
"chr": "chr22"
},
"1000GP_chr22_biallelic_snps.vcf.gz:md5,604930983c16df53c3560736b28cc653",
"1000GP_chr22_biallelic_snps.vcf.gz.tbi:md5,9e71ab3c0ead3ea55de972a5c2bc6bcb"
"1000GP_chr22_biallelic_snps.vcf.gz:md5,817ebeceadcaea1e95f92c7b67659f28",
"1000GP_chr22_biallelic_snps.vcf.gz.tbi:md5,d3460d21cacfbb15b34289454e2922a8"
]
],
"versions": [
Expand All @@ -149,6 +149,6 @@
"nf-test": "0.8.4",
"nextflow": "23.10.1"
},
"timestamp": "2024-07-18T15:23:07.295622189"
"timestamp": "2024-07-22T15:51:02.997348191"
}
}
5 changes: 4 additions & 1 deletion subworkflows/local/vcf_phase_shapeit5/tests/main.nf.test
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,10 @@ nextflow_workflow {
{ assert snapshot(workflow.out.vcf_tbi.collect{
path(it[1]).vcf.summary
}).match("Phasing content")
}
},
{ workflow.out.vcf_tbi.collect{
assert path(it[1]).vcf.phased
}}
)
}
}
Expand Down
18 changes: 9 additions & 9 deletions subworkflows/local/vcf_phase_shapeit5/tests/main.nf.test.snap
Original file line number Diff line number Diff line change
Expand Up @@ -21,16 +21,16 @@
"id": "1000GP",
"chr": "chr21"
},
"1000GP.vcf.gz:md5,7c8ba1152183b04ad8e58fc55c670f68",
"1000GP.vcf.gz.csi:md5,a26c327c943293349c070148a33a716d"
"1000GP.vcf.gz:md5,a8af1c991fb1ca9e0919e0d5ddae8968",
"1000GP.vcf.gz.csi:md5,b4c653bd398bb838b496e022705bb562"
],
[
{
"id": "1000GP",
"chr": "chr22"
},
"1000GP.vcf.gz:md5,03119a79fed552cd3f62b4662f31ab48",
"1000GP.vcf.gz.csi:md5,188cf70b4c8365bf930d320048b10e59"
"1000GP.vcf.gz:md5,106157dc553c3c19eebdce0567e69d4f",
"1000GP.vcf.gz.csi:md5,58026cf302bd82382a078c5690429b5c"
]
],
"1": [
Expand All @@ -46,16 +46,16 @@
"id": "1000GP",
"chr": "chr21"
},
"1000GP.vcf.gz:md5,7c8ba1152183b04ad8e58fc55c670f68",
"1000GP.vcf.gz.csi:md5,a26c327c943293349c070148a33a716d"
"1000GP.vcf.gz:md5,a8af1c991fb1ca9e0919e0d5ddae8968",
"1000GP.vcf.gz.csi:md5,b4c653bd398bb838b496e022705bb562"
],
[
{
"id": "1000GP",
"chr": "chr22"
},
"1000GP.vcf.gz:md5,03119a79fed552cd3f62b4662f31ab48",
"1000GP.vcf.gz.csi:md5,188cf70b4c8365bf930d320048b10e59"
"1000GP.vcf.gz:md5,106157dc553c3c19eebdce0567e69d4f",
"1000GP.vcf.gz.csi:md5,58026cf302bd82382a078c5690429b5c"
]
],
"versions": [
Expand All @@ -71,6 +71,6 @@
"nf-test": "0.8.4",
"nextflow": "23.10.1"
},
"timestamp": "2024-07-18T15:56:18.455135158"
"timestamp": "2024-07-22T15:46:34.727932091"
}
}
5 changes: 4 additions & 1 deletion subworkflows/local/vcf_split_bcftools/tests/main.nf.test
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,10 @@ nextflow_workflow {
{ assert snapshot(workflow.out.vcf_tbi.collect{
path(it[1]).vcf.summary
}).match("Phasing content")
}
},
{ workflow.out.vcf_tbi.collect{
assert path(it[1]).vcf.sampleCount == 1
}}
)
}
}
Expand Down
14 changes: 7 additions & 7 deletions subworkflows/local/vcf_split_bcftools/tests/main.nf.test.snap
Original file line number Diff line number Diff line change
Expand Up @@ -7,21 +7,21 @@
{
"id": "NA12878"
},
"NA12878.vcf.gz:md5,6146dcfb5290286a6442de65869e0222",
"NA12878.vcf.gz:md5,af16cd340d33ffecc15dd6062b243232",
"NA12878.vcf.gz.tbi:md5,31c12acb72d301cc69478c58b513d779"
],
[
{
"id": "NA19401"
},
"NA19401.vcf.gz:md5,ea44e5b4d6e1d78de62a46b7624e3904",
"NA19401.vcf.gz:md5,09e2e2a30260310fe7db55edcf36b1c9",
"NA19401.vcf.gz.tbi:md5,8f93c5e7d94089d9b0313f1d7d7ba40d"
],
[
{
"id": "NA20359"
},
"NA20359.vcf.gz:md5,88bf832be1d8a9cf4bc188d105afc5a2",
"NA20359.vcf.gz:md5,56cba6b61bcc14c42d92bf3708ebf621",
"NA20359.vcf.gz.tbi:md5,6bf326636fb91d7ffffad543763c5be1"
]
],
Expand All @@ -33,21 +33,21 @@
{
"id": "NA12878"
},
"NA12878.vcf.gz:md5,6146dcfb5290286a6442de65869e0222",
"NA12878.vcf.gz:md5,af16cd340d33ffecc15dd6062b243232",
"NA12878.vcf.gz.tbi:md5,31c12acb72d301cc69478c58b513d779"
],
[
{
"id": "NA19401"
},
"NA19401.vcf.gz:md5,ea44e5b4d6e1d78de62a46b7624e3904",
"NA19401.vcf.gz:md5,09e2e2a30260310fe7db55edcf36b1c9",
"NA19401.vcf.gz.tbi:md5,8f93c5e7d94089d9b0313f1d7d7ba40d"
],
[
{
"id": "NA20359"
},
"NA20359.vcf.gz:md5,88bf832be1d8a9cf4bc188d105afc5a2",
"NA20359.vcf.gz:md5,56cba6b61bcc14c42d92bf3708ebf621",
"NA20359.vcf.gz.tbi:md5,6bf326636fb91d7ffffad543763c5be1"
]
],
Expand All @@ -60,7 +60,7 @@
"nf-test": "0.8.4",
"nextflow": "23.10.1"
},
"timestamp": "2024-07-18T17:13:32.502214075"
"timestamp": "2024-07-22T15:45:19.206308102"
},
"Phasing content": {
"content": [
Expand Down

0 comments on commit 3f637d7

Please sign in to comment.