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 @@ -15,6 +15,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- [#226](https://github.com/nf-core/phaseimpute/pull/226) - Remove `BEDTOOLS` and update automated methods description.
- [#239](https://github.com/nf-core/phaseimpute/pull/239) - Move from local to nf-core sbwf for `STITCH` imputation. Set `--chunks` as optional argument. Update `usage.md`.
- [#240](https://github.com/nf-core/phaseimpute/pull/240) - Move from local to nf-core sbwf for `GLIMPSE2` imputation. Update `usage.md`.
- [#243](https://github.com/nf-core/phaseimpute/pull/243) - Move from local to nf-core sbwf for `BEAGLE5` imputation. Update `usage.md`.

### `Fixed`

Expand Down
29 changes: 21 additions & 8 deletions conf/steps/imputation_beagle5.config
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,7 @@ process {
// Impute the variants with BEAGLE5
withName: 'NFCORE_PHASEIMPUTE:PHASEIMPUTE:VCF_IMPUTE_BEAGLE5:.*' {
publishDir = [ enabled: false ]
tag = {"${meta.id} ${meta.chr}"}
}

withName: 'NFCORE_PHASEIMPUTE:PHASEIMPUTE:VCF_IMPUTE_BEAGLE5:BEAGLE5_BEAGLE' {
ext.args = { "gp=true ap=true chrom=${meta.chr}" }
ext.prefix = { "${meta.id}.${meta.chr}.beagle5" }
publishDir = [ enabled: false ]
tag = {"${meta.id} ${meta.regionout ?: meta.chr}"}
}

// Convert BCF to VCF if necessary
Expand All @@ -32,12 +26,31 @@ process {
publishDir = [ enabled: false ]
}


withName: 'NFCORE_PHASEIMPUTE:PHASEIMPUTE:VCF_IMPUTE_BEAGLE5:BEAGLE5_BEAGLE' {
ext.args = { "gp=true ap=true seed=${params.seed}" }
ext.prefix = { "${meta.id}.batch${meta.batch}.${meta.regionout ? meta.regionout.replace(':','_') : meta.chr}.beagle5" }
publishDir = [ enabled: false ]
}

// Index the imputed VCF files
withName: 'NFCORE_PHASEIMPUTE:PHASEIMPUTE:VCF_IMPUTE_BEAGLE5:BCFTOOLS_INDEX_BEAGLE' {
withName: 'NFCORE_PHASEIMPUTE:PHASEIMPUTE:VCF_IMPUTE_BEAGLE5:BCFTOOLS_INDEX_PHASE' {
ext.args = ''
publishDir = [ enabled: false ]
}

// Ligate all results
withName: 'NFCORE_PHASEIMPUTE:PHASEIMPUTE:VCF_IMPUTE_BEAGLE5:GLIMPSE2_LIGATE' {
ext.args = { "--seed ${params.seed}" }
ext.prefix = { "${meta.id}.batch${meta.batch}.${meta.chr}.ligate" }
publishDir = [ enabled: false ]
}

withName: 'NFCORE_PHASEIMPUTE:PHASEIMPUTE:VCF_IMPUTE_BEAGLE5:BCFTOOLS_INDEX_LIGATE' {
ext.args = "--tbi"
publishDir = [ enabled: false ]
}

// Concatenate the imputed chromosomes
withName: 'NFCORE_PHASEIMPUTE:PHASEIMPUTE:CONCAT_BEAGLE5:.*' {
publishDir = [
Expand Down
4 changes: 2 additions & 2 deletions conf/steps/imputation_glimpse2.config
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ process {
publishDir = [ enabled: false ]
}

withName: 'NFCORE_PHASEIMPUTE:PHASEIMPUTE:BAM_VCF_IMPUTE_GLIMPSE2:BCFTOOLS_INDEX_1' {
withName: 'NFCORE_PHASEIMPUTE:PHASEIMPUTE:BAM_VCF_IMPUTE_GLIMPSE2:BCFTOOLS_INDEX_PHASE' {
ext.args = "--csi"
publishDir = [ enabled: false ]
}
Expand All @@ -36,7 +36,7 @@ process {
publishDir = [ enabled: false ]
}

withName: 'NFCORE_PHASEIMPUTE:PHASEIMPUTE:BAM_VCF_IMPUTE_GLIMPSE2:BCFTOOLS_INDEX_2' {
withName: 'NFCORE_PHASEIMPUTE:PHASEIMPUTE:BAM_VCF_IMPUTE_GLIMPSE2:BCFTOOLS_INDEX_LIGATE' {
ext.args = "--tbi"
publishDir = [ enabled: false ]
}
Expand Down
9 changes: 8 additions & 1 deletion docs/usage.md
Original file line number Diff line number Diff line change
Expand Up @@ -449,7 +449,7 @@ Optionnaly you can provide the following flags:
| `GLIMPSE2` | ✅ | ✅ ¹ | ✅ | ✅ | ❌ | ✅ | ✅ |
| `QUILT` | ✅ | ✅ ² | ✅ | ❌ | ✅ ⁴ | ❌⁶ | ✅ |
| `STITCH` | ✅ | ✅ ² | ✅ | ❌ | ✅ ³ | ✅ | ✅ |
| `BEAGLE5` | ✅ | ✅ ¹ | ✅ | ✅ | ❌ | ❌⁶ | ❌⁶ |
| `BEAGLE5` | ✅ | ✅ ¹ | ✅ | ✅ | ❌ | | ✅ |
| `MINIMAC4` | ✅ | ✅ ¹ | ✅ | ✅ | ✅ ⁵ | ❌⁶ | ❌⁶ |

> ¹ Alignment files as well as variant calling format (i.e. BAM, CRAM, VCF or BCF)
Expand Down Expand Up @@ -661,6 +661,13 @@ nextflow run nf-core/phaseimpute \

The CSV file provided in `--panel` must be prepared with `--steps panelprep` and must contain four columns [panel, chr, vcf, index].

You can optionally provide chunks to parallelize the imputation process using `--chunks`.
If not provided the full region per chromosome will be used.
See [Chunks section](#samplesheet-chunks) for more information.

Genetic map can also be provided for better accuracy.
See [Map section](#samplesheet-map) for more information.

### MINIMAC4

[MINIMAC4](https://github.com/statgen/Minimac4) is a low memory, computationally efficient implementation of the MaCH algorithm for genotype imputation. It is designed to work on phased haplotypes and can handle very large reference panels.
Expand Down
25 changes: 20 additions & 5 deletions modules.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,12 @@
"bcftools/index": {
"branch": "master",
"git_sha": "41dfa3f7c0ffabb96a6a813fe321c6d1cc5b6e46",
"installed_by": ["bam_impute_stitch", "bam_vcf_impute_glimpse2", "modules"]
"installed_by": [
"bam_impute_stitch",
"bam_vcf_impute_glimpse2",
"modules",
"vcf_impute_beagle5"
]
},
"bcftools/merge": {
"branch": "master",
Expand Down Expand Up @@ -62,12 +67,12 @@
"bcftools/view": {
"branch": "master",
"git_sha": "41dfa3f7c0ffabb96a6a813fe321c6d1cc5b6e46",
"installed_by": ["modules"]
"installed_by": ["modules", "vcf_impute_beagle5"]
},
"beagle5/beagle": {
"branch": "master",
"git_sha": "359cfb69d521fcb8b56313e9a6ca9d66036aa921",
"installed_by": ["modules"]
"git_sha": "94a767478097e92dca1386ea623d9dae9edc025a",
"installed_by": ["modules", "vcf_impute_beagle5"]
},
"gawk": {
"branch": "master",
Expand Down Expand Up @@ -102,7 +107,12 @@
"glimpse2/ligate": {
"branch": "master",
"git_sha": "94a767478097e92dca1386ea623d9dae9edc025a",
"installed_by": ["bam_impute_stitch", "bam_vcf_impute_glimpse2", "modules"]
"installed_by": [
"bam_impute_stitch",
"bam_vcf_impute_glimpse2",
"modules",
"vcf_impute_beagle5"
]
},
"glimpse2/phase": {
"branch": "master",
Expand Down Expand Up @@ -239,6 +249,11 @@
"branch": "master",
"git_sha": "4b406a74dc0449c0401ed87d5bfff4252fd277fd",
"installed_by": ["subworkflows"]
},
"vcf_impute_beagle5": {
"branch": "master",
"git_sha": "e8db6baba21376a4cf0dfc5ba32224eebf51266c",
"installed_by": ["subworkflows"]
}
}
}
Expand Down
52 changes: 35 additions & 17 deletions modules/nf-core/beagle5/beagle/main.nf

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

4 changes: 4 additions & 0 deletions modules/nf-core/beagle5/beagle/meta.yml

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

87 changes: 54 additions & 33 deletions modules/nf-core/beagle5/beagle/tests/main.nf.test

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

Loading
Loading