Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- [#188](https://github.com/nf-core/phaseimpute/pull/188) - Add documentation for all subworkflows.
- [#210](https://github.com/nf-core/phaseimpute/pull/200) - Add BEAGLE5 support for genotype imputation.
- [#211](https://github.com/nf-core/phaseimpute/pull/211) - Add MINIMAC4 support for genotype imputation.
- [#222](https://github.com/nf-core/phaseimpute/pull/222) - Add genetic map support for `MINIMAC4`.

### `Changed`

Expand Down
2 changes: 1 addition & 1 deletion subworkflows/local/vcf_impute_minimac4/meta.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ input:
Need to have "chr" as chromosome name
- map:
type: file
description: PLINK format genetic map files
description: Minimac format genetic map files
pattern: "*.map"
output:
- vcf_tbi:
Expand Down
75 changes: 41 additions & 34 deletions subworkflows/local/vcf_impute_minimac4/tests/main.nf.test
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ nextflow_workflow {
tag "minimac4/compressref"
tag "minimac4/impute"

test("Impute with minimac4 one vcf") {
test("Impute with minimac4 one vcf no map") {

when {
workflow {
Expand All @@ -41,14 +41,15 @@ nextflow_workflow {
assertAll(
{ assert workflow.success },
{ assert snapshot(
workflow.out.versions,
workflow.out.vcf_index.collect{[
workflow.out.vcf_tbi.collect{[
it[0],
file(it[1]).name,
file(it[2]).name
] },
workflow.out.vcf_index.collect{ path(it[1]).vcf.summary },
workflow.out.vcf_index.collect{ path(it[1]).vcf.variantsMD5 }
path(it[1]).getFileName().toString(),
path(it[2]).getFileName().toString(),
path(it[1]).vcf.summary,
path(it[1]).vcf.header.getGenotypeSamples().sort(),
path(it[1]).vcf.variantsMD5
]},
workflow.out.versions.collect{ path(it).yaml }
).match() }
)
}
Expand All @@ -71,7 +72,7 @@ nextflow_workflow {
])
input[2] = Channel.of([
[chr: "chr22"],
file(params.pipelines_testdata_base_path + "hum_data/reference_genome/GRCh38_chr22.glimpse.map", checkIfExist:true)
file(params.pipelines_testdata_base_path + "hum_data/reference_genome/GRCh38_chr22.minimac.map", checkIfExist:true)
])
input[3] = Channel.of([[chr: "chr22"], [], [], [], []])
"""
Expand All @@ -82,20 +83,21 @@ nextflow_workflow {
assertAll(
{ assert workflow.success },
{ assert snapshot(
workflow.out.versions,
workflow.out.vcf_index.collect{[
workflow.out.vcf_tbi.collect{[
it[0],
file(it[1]).name,
file(it[2]).name
] },
workflow.out.vcf_index.collect{ path(it[1]).vcf.summary },
workflow.out.vcf_index.collect{ path(it[1]).vcf.variantsMD5 }
path(it[1]).getFileName().toString(),
path(it[2]).getFileName().toString(),
path(it[1]).vcf.summary,
path(it[1]).vcf.header.getGenotypeSamples().sort(),
path(it[1]).vcf.variantsMD5
]},
workflow.out.versions.collect{ path(it).yaml }
).match() }
)
}
}

test("Impute with minimac4 two vcf") {
test("Impute with minimac4 two vcf with map") {

when {
workflow {
Expand All @@ -117,7 +119,10 @@ nextflow_workflow {
file(params.pipelines_testdata_base_path + "hum_data/panel/chr22/1000GP.chr22.s.norel.vcf.gz", checkIfExist:true),
file(params.pipelines_testdata_base_path + "hum_data/panel/chr22/1000GP.chr22.s.norel.vcf.gz.csi", checkIfExist:true)
])
input[2] = Channel.of([[chr: "chr22"], []])
input[2] = Channel.of([
[chr: "chr22"],
file(params.pipelines_testdata_base_path + "hum_data/reference_genome/GRCh38_chr22.minimac.map", checkIfExist:true)
])
input[3] = Channel.of([[chr: "chr22"], [], [], [], []])
"""
}
Expand All @@ -127,20 +132,21 @@ nextflow_workflow {
assertAll(
{ assert workflow.success },
{ assert snapshot(
workflow.out.versions,
workflow.out.vcf_index.collect{[
workflow.out.vcf_tbi.collect{[
it[0],
file(it[1]).name,
file(it[2]).name
] },
workflow.out.vcf_index.collect{ path(it[1]).vcf.summary },
workflow.out.vcf_index.collect{ path(it[1]).vcf.variantsMD5 }
path(it[1]).getFileName().toString(),
path(it[2]).getFileName().toString(),
path(it[1]).vcf.summary,
path(it[1]).vcf.header.getGenotypeSamples().sort(),
path(it[1]).vcf.variantsMD5
]},
workflow.out.versions.collect{ path(it).yaml }
).match() }
)
}
}

test("Impute with minimac4 one vcf with sites") {
test("Impute with minimac4 one vcf with sites, no map") {

when {
workflow {
Expand All @@ -157,7 +163,7 @@ nextflow_workflow {
])
input[2] = Channel.of([
[chr: "chr22"],
file(params.pipelines_testdata_base_path + "hum_data/reference_genome/GRCh38_chr22.glimpse.map", checkIfExist:true)
[]
])
input[3] = Channel.of([
[chr: "chr22"],
Expand All @@ -174,14 +180,15 @@ nextflow_workflow {
assertAll(
{ assert workflow.success },
{ assert snapshot(
workflow.out.versions,
workflow.out.vcf_index.collect{[
workflow.out.vcf_tbi.collect{[
it[0],
file(it[1]).name,
file(it[2]).name
] },
workflow.out.vcf_index.collect{ path(it[1]).vcf.summary },
workflow.out.vcf_index.collect{ path(it[1]).vcf.variantsMD5 }
path(it[1]).getFileName().toString(),
path(it[2]).getFileName().toString(),
path(it[1]).vcf.summary,
path(it[1]).vcf.header.getGenotypeSamples().sort(),
path(it[1]).vcf.variantsMD5
]},
workflow.out.versions.collect{ path(it).yaml }
).match() }
)
}
Expand Down
174 changes: 75 additions & 99 deletions subworkflows/local/vcf_impute_minimac4/tests/main.nf.test.snap
Original file line number Diff line number Diff line change
@@ -1,142 +1,118 @@
{
"Impute with minimac4 two vcf": {
"Impute with minimac4 one vcf no map": {
"content": [
[
"versions.yml:md5,373fe12da367d3891473f487a9536d04",
"versions.yml:md5,99b8cb34e87147cec893f4bcf7a9b244",
"versions.yml:md5,a4842af8fedc3522b989d4ee28f08d80"

],
[
[
{
"id": "NA12878",
"panel": "1000GP",
"chr": "chr22",
"tools": "minimac4"
},
"NA12878.vcf.gz",
"NA12878.vcf.gz.csi"
],
[
{
"id": "NA19401",
"panel": "1000GP",
"chr": "chr22",
"tools": "minimac4"
},
"NA19401.vcf.gz",
"NA19401.vcf.gz.csi"
]
],
[
"VcfFile [chromosomes=[chr22], sampleCount=1, variantCount=903, phased=true, phasedAutodetect=true]",
"VcfFile [chromosomes=[chr22], sampleCount=1, variantCount=903, phased=true, phasedAutodetect=true]"
],
[
"c4327d84f0355b88979ec03dd037514b",
"1b1c49668e75466692e0f586fc47f747"
{
"VCF_IMPUTE_MINIMAC4:MINIMAC4_COMPRESSREF": {
"minimac4": "4.1.6"
}
},
{
"VCF_IMPUTE_MINIMAC4:BCFTOOLS_INDEX": {
"bcftools": 1.21
}
},
{
"VCF_IMPUTE_MINIMAC4:MINIMAC4_IMPUTE": {
"minimac4": "4.1.6"
}
}
]
],
"meta": {
"nf-test": "0.9.2",
"nf-test": "0.9.3",
"nextflow": "25.10.0"
},
"timestamp": "2025-11-11T12:36:15.295537018"
"timestamp": "2025-11-18T14:57:42.013572476"
},
"Impute with minimac4 one vcf": {
"Impute with minimac4 two vcf with map": {
"content": [
[
"versions.yml:md5,373fe12da367d3891473f487a9536d04",
"versions.yml:md5,99b8cb34e87147cec893f4bcf7a9b244",
"versions.yml:md5,a4842af8fedc3522b989d4ee28f08d80"
],
[
[
{
"id": "NA12878",
"panel": "1000GP",
"chr": "chr22",
"tools": "minimac4"
},
"NA12878.vcf.gz",
"NA12878.vcf.gz.csi"
]
],
[
"VcfFile [chromosomes=[chr22], sampleCount=1, variantCount=903, phased=true, phasedAutodetect=true]"

],
[
"c4327d84f0355b88979ec03dd037514b"
{
"VCF_IMPUTE_MINIMAC4:MINIMAC4_COMPRESSREF": {
"minimac4": "4.1.6"
}
},
{
"VCF_IMPUTE_MINIMAC4:BCFTOOLS_INDEX": {
"bcftools": 1.21
}
},
{
"VCF_IMPUTE_MINIMAC4:MINIMAC4_IMPUTE": {
"minimac4": "4.1.6"
}
}
]
],
"meta": {
"nf-test": "0.9.2",
"nf-test": "0.9.3",
"nextflow": "25.10.0"
},
"timestamp": "2025-11-11T12:35:46.826956402"
"timestamp": "2025-11-18T14:58:06.940677488"
},
"Impute with minimac4 one vcf with sites": {
"Impute with minimac4 one vcf with sites, no map": {
"content": [
[
"versions.yml:md5,373fe12da367d3891473f487a9536d04",
"versions.yml:md5,99b8cb34e87147cec893f4bcf7a9b244",
"versions.yml:md5,a4842af8fedc3522b989d4ee28f08d80"

],
[
[
{
"id": "NA12878",
"panel": "1000GP",
"chr": "chr22",
"tools": "minimac4"
},
"NA12878.vcf.gz",
"NA12878.vcf.gz.csi"
]
],
[
"VcfFile [chromosomes=[chr22], sampleCount=1, variantCount=903, phased=true, phasedAutodetect=true]"
],
[
"ab57a5554b8c01ae0494318233d1b1dd"
{
"VCF_IMPUTE_MINIMAC4:MINIMAC4_COMPRESSREF": {
"minimac4": "4.1.6"
}
},
{
"VCF_IMPUTE_MINIMAC4:BCFTOOLS_INDEX": {
"bcftools": 1.21
}
},
{
"VCF_IMPUTE_MINIMAC4:MINIMAC4_IMPUTE": {
"minimac4": "4.1.6"
}
}
]
],
"meta": {
"nf-test": "0.9.2",
"nf-test": "0.9.3",
"nextflow": "25.10.0"
},
"timestamp": "2025-11-11T12:36:28.874465664"
"timestamp": "2025-11-18T14:58:19.03416638"
},
"Impute with minimac4 one vcf with map": {
"content": [
[
"versions.yml:md5,373fe12da367d3891473f487a9536d04",
"versions.yml:md5,99b8cb34e87147cec893f4bcf7a9b244",
"versions.yml:md5,a4842af8fedc3522b989d4ee28f08d80"
],
[
[
{
"id": "NA12878",
"panel": "1000GP",
"chr": "chr22",
"tools": "minimac4"
},
"NA12878.vcf.gz",
"NA12878.vcf.gz.csi"
]
],
[
"VcfFile [chromosomes=[chr22], sampleCount=1, variantCount=903, phased=true, phasedAutodetect=true]"

],
[
"ab57a5554b8c01ae0494318233d1b1dd"
{
"VCF_IMPUTE_MINIMAC4:MINIMAC4_COMPRESSREF": {
"minimac4": "4.1.6"
}
},
{
"VCF_IMPUTE_MINIMAC4:BCFTOOLS_INDEX": {
"bcftools": 1.21
}
},
{
"VCF_IMPUTE_MINIMAC4:MINIMAC4_IMPUTE": {
"minimac4": "4.1.6"
}
}
]
],
"meta": {
"nf-test": "0.9.2",
"nf-test": "0.9.3",
"nextflow": "25.10.0"
},
"timestamp": "2025-11-11T12:36:00.295884864"
"timestamp": "2025-11-18T15:00:50.226056725"
}
}