Skip to content
Closed
Show file tree
Hide file tree
Changes from 15 commits
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
456f943
Draft of Minimac4 adding
gichas Jul 7, 2025
35494eb
Draft Minimac4
gichas Jul 8, 2025
85bcf02
Draft of the adding of minimac4
gichas Jul 9, 2025
ff25e84
Draft MINIMAC4
gichas Jul 10, 2025
8fc74aa
Adding Minimac4 to phaseimpute
gichas Jul 15, 2025
9b4310d
Removing useless files
gichas Jul 15, 2025
72b512b
Update files
gichas Jul 15, 2025
e14a3b6
Delete main_dev.nf
gichas Jul 15, 2025
41a5f9f
Address review comments
gichas Jul 16, 2025
a99b706
Update of README.md
gichas Jul 16, 2025
33818f2
Merge branch 'minimac4' of github.com:gichas/phaseimpute into minimac4
gichas Jul 16, 2025
683b90b
Update CHANGELOG.md
gichas Jul 17, 2025
292c225
Update the Minimac4 subworkflow logic
gichas Jul 17, 2025
bed0e3d
Quick fix
gichas Jul 17, 2025
3904358
Merge remote-tracking branch 'upstream/dev' into minimac4
gichas Jul 18, 2025
0287a3f
Update subworkflows/local/utils_nfcore_phaseimpute_pipeline/main.nf
LouisLeNezet Jul 18, 2025
6c9832e
Fix channel combination and update tests
gichas Jul 20, 2025
b8ca221
Fix last changes
gichas Jul 20, 2025
913c810
Fix indentation
gichas Jul 20, 2025
5021c01
Removing extra space in CHANGELOG.md
gichas Jul 21, 2025
0ecffd2
Update usage.md
gichas Jul 21, 2025
ce90cf0
Allow minimac without posfile input
Jul 22, 2025
8466356
Update workflows/phaseimpute/main.nf
gichas Jul 22, 2025
397b988
Update minimac4 tests and channel handling
gichas Jul 22, 2025
82cb194
Resolve merge conflict
gichas Jul 22, 2025
fcd8c7f
Fix Minimac4
gichas Jul 22, 2025
23de5d3
Fix Minimac4 tests
gichas Jul 22, 2025
014bdb1
Removing extra spaces
gichas Jul 22, 2025
57e35a1
Remove extra indentation
Jul 22, 2025
54d1714
Update CHANGELOG.md
LouisLeNezet Jul 25, 2025
551a368
Update subworkflows/local/utils_nfcore_phaseimpute_pipeline/main.nf
LouisLeNezet Jul 25, 2025
9501cb7
local changes, has to be erased
gichas Jul 25, 2025
c73b22d
Update map file
gichas Jul 28, 2025
cb7383c
Update gunzip module
gichas Jul 28, 2025
f7c57f5
Merge branch 'minimac4' of github.com:gichas/phaseimpute into minimac4
gichas Jul 28, 2025
24afeb8
Fix workflow
gichas Jul 28, 2025
cc03b83
Fix workflow
gichas Jul 28, 2025
a12a08d
Update subworkflows/local/utils_nfcore_phaseimpute_pipeline/main.nf
LouisLeNezet Aug 1, 2025
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
8 changes: 7 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- [#175](https://github.com/nf-core/phaseimpute/pull/175) - Add support for all input files in `.json` or `.yaml` format.
- [#181](https://github.com/nf-core/phaseimpute/pull/181) - Add nf-co2footprint plugin to the config file.
- [#184](https://github.com/nf-core/phaseimpute/pull/184) - Add support `.csi` index for `.bam` files.
- [#188](https://github.com/nf-core/phaseimpute/pull/188) - Add documentation for all subworkflows.
- [#188](https://github.com/nf-core/phaseimpute/pull/188) - Add documentation for all subworkflows
- [#204](https://github.com/nf-core/phaseimpute/pull/204) - Add MINIMAC4 support for genotype imputation.

### `Changed`

Expand Down Expand Up @@ -127,6 +128,8 @@ Special thanks to [Matthias Hörtenhuber](https://github.com/mashehu), [Mazzalab
- [#164](https://github.com/nf-core/phaseimpute/pull/164) - Improve documentation writing
- [#163](https://github.com/nf-core/phaseimpute/pull/163) - Fix MULTIQC samples names (add post-processing for clean up `FILTER_CHR_DWN`, `FILTER_CHR_INP`, `GAWK_ERROR_SPL`, `GAWK_RSQUARE_SPL`). Fix output panel `publishDir`. Fix java version to `17` in `ci.yml` due to new nextflow version.



### `Dependencies`

| Dependency | New version |
Expand All @@ -143,6 +146,7 @@ Special thanks to [Matthias Hörtenhuber](https://github.com/mashehu), [Mazzalab
| `r-stitch` | 1.6.10 |
| `samtools` | 1.21 |
| `shapeit5` | 1.0.0 |
| `minimac4` | 4.1.6 |
| `tabix` | 1.11 |
| `vcflib` | 1.0.3 |

Expand All @@ -159,3 +163,5 @@ Special thanks to [Matthias Hörtenhuber](https://github.com/mashehu), [Mazzalab
[Hemanoel Passarelli](https://github.com/hemanoel)
[Matthias Hörtenhuber](https://github.com/mashehu)
[Sofia Stamouli](https://github.com/sofstam)
[Gaspard Ichas](https://github.com/gichas)

3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,8 @@ The whole pipeline consists of five main steps, each of which can be run separat
- **Position Extraction** for targeted imputation sites.

4. **Imputation (`--impute`)**: This is the primary step, where genotypes in the target dataset are imputed using the prepared reference panel. The main steps are:
- **Imputation** of the target dataset using tools like [Glimpse1](https://odelaneau.github.io/GLIMPSE/glimpse1/index.html), [Glimpse2](https://odelaneau.github.io/GLIMPSE/), [Stitch](https://github.com/rwdavies/stitch), or [Quilt](https://github.com/rwdavies/QUILT).

- **Imputation** of the target dataset using tools like [Glimpse1](https://odelaneau.github.io/GLIMPSE/glimpse1/index.html), [Glimpse2](https://odelaneau.github.io/GLIMPSE/), [Stitch](https://github.com/rwdavies/stitch), [Quilt](https://github.com/rwdavies/QUILT) or [Minimac4](https://github.com/statgen/Minimac4).
- **Ligation** of imputed chunks to produce a final VCF file per sample, with all chromosomes unified.

5. **Validation (`--validate`)**: Assesses imputation accuracy by comparing the imputed dataset to a truth dataset. This step leverages the [Glimpse2](https://odelaneau.github.io/GLIMPSE/) concordance process to summarize differences between two VCF files.
Expand Down
50 changes: 50 additions & 0 deletions conf/steps/imputation_minimac4.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
/*
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Config file for defining DSL2 per module options and publishing paths
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Available keys to override module options:
ext.args = Additional arguments appended to command in module.
ext.args2 = Second set of arguments appended to command in module (multi-tool modules).
ext.args3 = Third set of arguments appended to command in module (multi-tool modules).
ext.prefix = File name prefix for output files.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
*/

process {
withName: 'NFCORE_PHASEIMPUTE:PHASEIMPUTE:VCF_IMPUTE_MINIMAC4:.*' {
publishDir = [enabled: false]
tag = { "${meta.id} ${meta.chr}" }
}

withName: 'NFCORE_PHASEIMPUTE:PHASEIMPUTE:VCF_IMPUTE_MINIMAC4:MINIMAC4_COMPRESSREF' {
ext.args = ''
ext.prefix = { "${meta.id}.${meta.chr}.minimac4" }
publishDir = [enabled: false]
tag = { "${meta.id} ${meta.chr}" }
}

withName: 'NFCORE_PHASEIMPUTE:PHASEIMPUTE:VCF_IMPUTE_MINIMAC4:MINIMAC4_IMPUTE' {
ext.args = { "--output-format vcf.gz" }
ext.prefix = { "${meta.id}.${meta.chr}.minimac4" }
tag = { "${meta.id} ${meta.chr}" }
}

withName: 'NFCORE_PHASEIMPUTE:PHASEIMPUTE:VCF_IMPUTE_MINIMAC4:BCFTOOLS_INDEX' {
ext.args = ''
publishDir = [enabled: false]
tag = { "${meta.id} ${meta.chr}" }
}

withName: 'NFCORE_PHASEIMPUTE:PHASEIMPUTE:CONCAT_MINIMAC4:.*' {
publishDir = [
path: { "${params.outdir}/imputation/minimac4/concat" },
mode: params.publish_dir_mode,
saveAs: { filename -> filename.equals('versions.yml') ? null : filename }
]
}

withName: 'NFCORE_PHASEIMPUTE:PHASEIMPUTE:CONCAT_MINIMAC4:BCFTOOLS_CONCAT' {
ext.args = ["--ligate", "--output-type z", "--write-index=tbi"].join(' ')
ext.prefix = { "${meta.id}.minimac4" }
}
}
150 changes: 75 additions & 75 deletions conf/test_all.config
Original file line number Diff line number Diff line change
@@ -1,75 +1,75 @@
/*
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Nextflow config file for running minimal tests
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Defines input files and everything required to run a fast and simple pipeline test.

Use as follows:
nextflow run nf-core/phaseimpute -profile test_all,<docker/singularity> --outdir <OUTDIR>

----------------------------------------------------------------------------------------
*/

process {
resourceLimits = [
cpus: 4,
memory: '4.GB',
time: '1.h'
]
}

params {
config_profile_name = 'Test simulation / imputation / validation mode'
config_profile_description = 'Minimal test dataset to check pipeline function'

// Input data
input = "${projectDir}/tests/csv/sample_sim.csv"
input_region = "${projectDir}/tests/csv/region.csv"
depth = 1

// Genome references
fasta = params.pipelines_testdata_base_path + "hum_data/reference_genome/GRCh38.s.fa.gz"

// Panel preparation
panel = "${projectDir}/tests/csv/panel.csv"
phase = true
normalize = true
compute_freq = true
chunk_model = "recursive"
remove_samples = "NA12878,NA12891,NA12892"

// Pipeline steps
steps = "all"

// Impute tools
tools = "glimpse1,glimpse2,stitch,quilt"
}

process {
withName: 'NFCORE_PHASEIMPUTE:PHASEIMPUTE:VCF_CHUNK_GLIMPSE:GLIMPSE_CHUNK' {
ext.args = ["--window-size 10000", "--window-count 400", "--buffer-size 5000", "--buffer-count 30"].join(' ')
ext.prefix = { "${meta.id}_${meta.chr}_chunks_glimpse1" }
publishDir = [
path: { "${params.outdir}/prep_panel/chunks/glimpse1/" },
mode: params.publish_dir_mode,
saveAs: { filename -> filename.equals('versions.yml') ? null : filename },
enabled: true
]
}

withName: 'NFCORE_PHASEIMPUTE:PHASEIMPUTE:VCF_CHUNK_GLIMPSE:GLIMPSE2_CHUNK' {
ext.args = ["--window-mb 0.01", "--window-cm 0.01", "--window-count 200", "--buffer-mb 0.005", "--buffer-cm 0.005", "--buffer-count 30"].join(' ')
ext.prefix = { "${meta.id}_${meta.chr}_chunks_glimpse2" }
publishDir = [
path: { "${params.outdir}/prep_panel/chunks/glimpse2/" },
mode: params.publish_dir_mode,
saveAs: { filename -> filename.equals('versions.yml') ? null : filename },
enabled: true
]
}

withName: 'NFCORE_PHASEIMPUTE:PHASEIMPUTE:VCF_PHASE_SHAPEIT5:GLIMPSE2_CHUNK' {
ext.args = ["--window-mb 0.01", "--window-cm 0.01", "--window-count 200", "--buffer-mb 0.005", "--buffer-cm 0.005", "--buffer-count 30"].join(' ')
ext.prefix = { "${meta.id}_chunks" }
}
}
/*
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Nextflow config file for running minimal tests
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Defines input files and everything required to run a fast and simple pipeline test.
Use as follows:
nextflow run nf-core/phaseimpute -profile test_all,<docker/singularity> --outdir <OUTDIR>
----------------------------------------------------------------------------------------
*/
process {
resourceLimits = [
cpus: 4,
memory: '4.GB',
time: '1.h'
]
}
params {
config_profile_name = 'Test simulation / imputation / validation mode'
config_profile_description = 'Minimal test dataset to check pipeline function'
// Input data
input = "${projectDir}/tests/csv/sample_sim.csv"
input_region = "${projectDir}/tests/csv/region.csv"
depth = 1
// Genome references
fasta = params.pipelines_testdata_base_path + "hum_data/reference_genome/GRCh38.s.fa.gz"
// Panel preparation
panel = "${projectDir}/tests/csv/panel.csv"
phase = true
normalize = true
compute_freq = true
chunk_model = "recursive"
remove_samples = "NA12878,NA12891,NA12892"
// Pipeline steps
steps = "all"
// Impute tools
tools = "glimpse1,glimpse2,stitch,quilt"
}
process {
withName: 'NFCORE_PHASEIMPUTE:PHASEIMPUTE:VCF_CHUNK_GLIMPSE:GLIMPSE_CHUNK' {
ext.args = ["--window-size 10000", "--window-count 400", "--buffer-size 5000", "--buffer-count 30"].join(' ')
ext.prefix = { "${meta.id}_${meta.chr}_chunks_glimpse1" }
publishDir = [
path: { "${params.outdir}/prep_panel/chunks/glimpse1/" },
mode: params.publish_dir_mode,
saveAs: { filename -> filename.equals('versions.yml') ? null : filename },
enabled: true
]
}
withName: 'NFCORE_PHASEIMPUTE:PHASEIMPUTE:VCF_CHUNK_GLIMPSE:GLIMPSE2_CHUNK' {
ext.args = ["--window-mb 0.01", "--window-cm 0.01", "--window-count 200", "--buffer-mb 0.005", "--buffer-cm 0.005", "--buffer-count 30"].join(' ')
ext.prefix = { "${meta.id}_${meta.chr}_chunks_glimpse2" }
publishDir = [
path: { "${params.outdir}/prep_panel/chunks/glimpse2/" },
mode: params.publish_dir_mode,
saveAs: { filename -> filename.equals('versions.yml') ? null : filename },
enabled: true
]
}
withName: 'NFCORE_PHASEIMPUTE:PHASEIMPUTE:VCF_PHASE_SHAPEIT5:GLIMPSE2_CHUNK' {
ext.args = ["--window-mb 0.01", "--window-cm 0.01", "--window-count 200", "--buffer-mb 0.005", "--buffer-cm 0.005", "--buffer-count 30"].join(' ')
ext.prefix = { "${meta.id}_chunks" }
}
}
80 changes: 40 additions & 40 deletions conf/test_all_fullchr.config
Original file line number Diff line number Diff line change
@@ -1,40 +1,40 @@
/*
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Nextflow config file for running minimal tests
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Defines input files and everything required to run a fast and simple pipeline test.

Use as follows:
nextflow run nf-core/phaseimpute -profile test_all_fullchr,<docker/singularity> --outdir <OUTDIR>

----------------------------------------------------------------------------------------
*/

process {
resourceLimits = [
cpus: 24,
memory: '50.GB',
time: '4.h'
]
}

params {
config_profile_name = 'Test profile'
config_profile_description = 'Minimal test dataset to check all steps on full chromosomes'

// Genome references
fasta = params.pipelines_testdata_base_path + "hum_data/reference_genome/GRCh38.s.fa.gz"
panel = "${projectDir}/tests/csv/panel_fullchr.csv"
input = "${projectDir}/tests/csv/sample_sim_full.csv"

// Pipeline steps
steps = "all"
tools = "glimpse1,glimpse2,quilt,stitch"
depth = 1

// Panelprep optional args
remove_samples = "NA12878,NA19401,NA20359,NA12891,NA12892,NA20362"
normalize = true
compute_freq = false
phase = false
}
/*
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Nextflow config file for running minimal tests
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Defines input files and everything required to run a fast and simple pipeline test.
Use as follows:
nextflow run nf-core/phaseimpute -profile test_all_fullchr,<docker/singularity> --outdir <OUTDIR>
----------------------------------------------------------------------------------------
*/
process {
resourceLimits = [
cpus: 24,
memory: '50.GB',
time: '4.h'
]
}
params {
config_profile_name = 'Test profile'
config_profile_description = 'Minimal test dataset to check all steps on full chromosomes'
// Genome references
fasta = params.pipelines_testdata_base_path + "hum_data/reference_genome/GRCh38.s.fa.gz"
panel = "${projectDir}/tests/csv/panel_fullchr.csv"
input = "${projectDir}/tests/csv/sample_sim_full.csv"
// Pipeline steps
steps = "all"
tools = "glimpse1,glimpse2,quilt,stitch"
depth = 1
// Panelprep optional args
remove_samples = "NA12878,NA19401,NA20359,NA12891,NA12892,NA20362"
normalize = true
compute_freq = false
phase = false
}
Loading