Skip to content

nf-core/phaseimpute

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

nf-core/phaseimpute

Multi-step pipeline dedicated to genetic imputation from simulation to validation

GitHub Actions CI Status GitHub Actions Linting Status AWS CI Cite with Zenodo nf-test Nextflow run with conda run with docker run with singularity Launch on Seqera Platform

Get help on Slack Follow on Twitter Follow on Mastodon Watch on YouTube

Introduction

nf-core/phaseimpute is a bioinformatics pipeline to phase and impute genetic data. The pipeline is constituted of five main steps:

Metro map Modes
metromap - Check chromosomes names: Validates the presence of the different contigs in all variants and alignment files, ensuring data compatibility for further processing
- Panel preparation: Perfoms the phasing, QC, variant filtering, variant annotation of the reference panel
- Imputation: Imputes genotypes in the target dataset using the reference panel
- Simulate: Generates simulated datasets from high-quality target data for testing and validation purposes.
- Concordance: Evaluates the accuracy of imputation by comparing the imputed data against a truth dataset.

Usage

Note

If you are new to Nextflow and nf-core, please refer to this page on how to set-up Nextflow. Make sure to test your setup with -profile test before running the workflow on actual data.

The primary function of this pipeline is to impute a target dataset based on a phased panel. Begin by preparing a samplesheet with your input data, formatted as follows:

samplesheet.csv:

sample,file,index
SAMPLE_1X,/path/to/.<bam/cram>,/path/to/.<bai,crai>

Each row represents either a bam or a cram file along with its corresponding index file. Ensure that all input files have consistent file extensions.

For certain tools and steps within the pipeline, you will also need to provide a samplesheet for the reference panel. Here's an example of what a final samplesheet for a reference panel might look like, covering three chromosomes:

panel,chr,vcf,index
Phase3,1,ALL.chr1.phase3_shapeit2_mvncall_integrated_v5a.20130502.genotypes.vcf.gz,ALL.chr1.phase3_shapeit2_mvncall_integrated_v5a.20130502.genotypes.vcf.gz.csi
Phase3,2,ALL.chr2.phase3_shapeit2_mvncall_integrated_v5a.20130502.genotypes.vcf.gz,ALL.chr2.phase3_shapeit2_mvncall_integrated_v5a.20130502.genotypes.vcf.gz.csi
Phase3,3,ALL.chr3.phase3_shapeit2_mvncall_integrated_v5a.20130502.genotypes.vcf.gz,ALL.chr3.phase3_shapeit2_mvncall_integrated_v5a.20130502.genotypes.vcf.gz.csi

Running the pipeline

Execute the pipeline with the following command:

nextflow run nf-core/phaseimpute \
   -profile <docker/singularity/.../institute> \
   --input <samplesheet.csv>  \
   --genome "GRCh38" \
   --panel <phased_reference_panel.csv> \
   --steps "panelprep,impute" \
   --tools "glimpse1" \
   --outdir <OUTDIR>

Warning

Please provide pipeline parameters via the CLI or Nextflow -params-file option. Custom config files including those provided by the -c Nextflow option can be used to provide any configuration except for parameters; see docs.

For more details and further functionality, please refer to the usage documentation and the parameter documentation.

Description of the different steps of the pipeline

Here is a short description of the different steps of the pipeline. For more information please refer to the usage documentation.

steps Flow chart Description
--panelprep Panel preparation The preprocessing mode is responsible for preparing multiple input files that will be used by the phasing and imputation process.
The main processes are :
- Haplotypes phasing of the reference panel using Shapeit5.
- Normalize the reference panel to select only the necessary variants.
- Chunking the reference panel into a subset of regions for all the chromosomes.
- Extract the positions where to perform the imputation.
--impute Impute target The imputation mode is the core mode of this pipeline.
It consists of 3 main steps:
- Imputation: Impute the target dataset on the reference panel using either:
  - Glimpse1: It comes with the necessity to compute the genotype likelihoods of the target dataset (done using bcftools mpileup).
  - Glimpse2
  - Stitch This step does not require a reference panel but needs to merge the samples.
  - Quilt
- Ligation: all the different chunks are merged together then all chromosomes are reunited to output one VCF per sample.
--simulate simulate_metro The simulation mode is used to create artificial low informative genetic information from high density data. This allows the comparison of the imputed result to a truth and therefore evaluates the quality of the imputation.
For the moment it is possible to simulate:
- Low-pass data by downsample BAM or CRAM using samtools view -s at different depth.
--validate concordance_metro This mode compares two VCF files together to compute a summary of the differences between them.
This step uses Glimpse2 concordance process.

Pipeline output

To see the results of an example test run with a full size dataset refer to the results tab on the nf-core website pipeline page. For more details on the output files and reports, please refer to the output documentation.

Credits

nf-core/phaseimpute was originally written by Louis Le Nézet & Anabella Trigila.

We thank the following people for their extensive assistance in the development of this pipeline:

  • Saul Pierotti
  • Eugenia Fontecha
  • Matias Romero Victorica
  • Hemanoel Passarelli

Contributions and Support

If you would like to contribute to this pipeline, please see the contributing guidelines.

For further information or help, don't hesitate to get in touch on the Slack #phaseimpute channel (you can join with this invite).

Citations

If you use nf-core/phaseimpute for your analysis, please cite it using the following doi: 10.5281/zenodo.XXXXXX

An extensive list of references for the tools used by the pipeline, including QUILT, GLIMPSE, and STITCH, can be found in the CITATIONS.md file.

You can cite the nf-core publication as follows:

The nf-core framework for community-curated bioinformatics pipelines.

Philip Ewels, Alexander Peltzer, Sven Fillinger, Harshil Patel, Johannes Alneberg, Andreas Wilm, Maxime Ulysse Garcia, Paolo Di Tommaso & Sven Nahnsen.

Nat Biotechnol. 2020 Feb 13. doi: 10.1038/s41587-020-0439-x.