+ "description": "<h1>\n <picture>\n <source media=\"(prefers-color-scheme: dark)\" srcset=\"docs/images/logo/nf-core-phaseimpute_logo_dark.png\">\n <img alt=\"nf-core/phaseimpute\" src=\"docs/images/logo/nf-core-phaseimpute_logo_light.png\">\n </picture>\n</h1>\n\n[](https://github.com/nf-core/phaseimpute/actions/workflows/ci.yml)\n[](https://github.com/nf-core/phaseimpute/actions/workflows/linting.yml)[](https://nf-co.re/phaseimpute/results)[](https://doi.org/10.5281/zenodo.14329225)\n[](https://www.nf-test.com)\n\n[](https://www.nextflow.io/)\n[](https://github.com/nf-core/tools/releases/tag/3.3.1)\n[](https://docs.conda.io/en/latest/)\n[](https://www.docker.com/)\n[](https://sylabs.io/docs/)\n[](https://cloud.seqera.io/launch?pipeline=https://github.com/nf-core/phaseimpute)\n\n[](https://nfcore.slack.com/channels/phaseimpute)[](https://bsky.app/profile/nf-co.re)[](https://mstdn.science/@nf_core)[](https://www.youtube.com/c/nf-core)\n\n## Introduction\n\n**nf-core/phaseimpute** is a bioinformatics pipeline to phase and impute genetic data.\n\n<picture>\n <source media=\"(prefers-color-scheme: dark)\" srcset=\"docs/images/metro/MetroMap_animated_dark.svg\">\n <img src=\"docs/images/metro/MetroMap_animated.svg\" alt=\"metromap\"/>\n</picture>\n\nThe whole pipeline consists of five main steps, each of which can be run separately and independently. Users are not required to run all steps sequentially and can select specific steps based on their needs:\n\n1. **QC: Chromosome Name Check**: Ensures compatibility by validating that all expected contigs are present in the variant and alignment files.\n\n2. **Simulation (`--simulate`)**: Generates artificial datasets by downsampling high-density data to simulate low-pass genetic information. This enables the comparison of imputation results against a high-quality dataset (truth set). Simulations may include:\n\n - **Low-pass data generation** by downsampling BAM or CRAM files with [`samtools view -s`](https://www.htslib.org/doc/samtools-view.html) at different depths.\n\n3. **Panel Preparation (`--panelprep`)**: Prepares the reference panel through phasing, quality control, variant filtering, and annotation. Key processes include:\n\n - **Normalization** of the reference panel to retain essential variants.\n - **Phasing** of haplotypes in the reference panel using [Shapeit5](https://odelaneau.github.io/shapeit5/).\n - **Chunking** of the reference panel into specific regions across chromosomes.\n - **Position Extraction** for targeted imputation sites.\n\n4. **Imputation (`--impute`)**: This is the primary step, where genotypes in the target dataset are imputed using the prepared reference panel. The main steps are:\n\n - **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).\n - **Ligation** of imputed chunks to produce a final VCF file per sample, with all chromosomes unified.\n\n5. **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.\n\nFor more detailed instructions, please refer to the [usage documentation](https://nf-co.re/phaseimpute/usage).\n\n## Usage\n\n> [!NOTE]\n> If you are new to Nextflow and nf-core, please refer to [this page](https://nf-co.re/docs/usage/installation) on how to set-up Nextflow. Make sure to [test your setup](https://nf-co.re/docs/usage/introduction#how-to-run-a-pipeline) with `-profile test` before running the workflow on actual data.\n\nThe 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:\n\n```csv title=\"samplesheet.csv\"\nsample,file,index\nSAMPLE_1X,/path/to/.<bam/cram>,/path/to/.<bai,crai>\n```\n\nEach row represents either a bam or a cram file along with its corresponding index file. Ensure that all input files have consistent file extensions.\n\nFor 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:\n\n```csv title=\"panel.csv\"\npanel,chr,vcf,index\nPhase3,1,ALL.chr1.phase3_shapeit2_mvncall_integrated_v5a.20130502.genotypes.vcf.gz,ALL.chr1.phase3_shapeit2_mvncall_integrated_v5a.20130502.genotypes.vcf.gz.csi\nPhase3,2,ALL.chr2.phase3_shapeit2_mvncall_integrated_v5a.20130502.genotypes.vcf.gz,ALL.chr2.phase3_shapeit2_mvncall_integrated_v5a.20130502.genotypes.vcf.gz.csi\nPhase3,3,ALL.chr3.phase3_shapeit2_mvncall_integrated_v5a.20130502.genotypes.vcf.gz,ALL.chr3.phase3_shapeit2_mvncall_integrated_v5a.20130502.genotypes.vcf.gz.csi\n```\n\n## Running the pipeline\n\nRun one of the steps of the pipeline (imputation with glimpse1) using the following command and test profile:\n\n```bash\nnextflow run nf-core/phaseimpute \\\n -profile test, <docker/singularity/.../institute> \\\n --outdir <OUTDIR>\n```\n\n> [!WARNING]\n> 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](https://nf-co.re/docs/usage/getting_started/configuration#custom-configuration-files).\n\nFor more details and further functionality, please refer to the [usage documentation](https://nf-co.re/phaseimpute/usage) and the [parameter documentation](https://nf-co.re/phaseimpute/parameters).\n\n## Pipeline output\n\nTo see the results of an example test run with a full size dataset refer to the [results](https://nf-co.re/phaseimpute/results) tab on the nf-core website pipeline page.\nFor more details on the output files and reports, please refer to the [output documentation](https://nf-co.re/phaseimpute/output).\n\n## Credits\n\nnf-core/phaseimpute was originally written by Louis Le N\u00e9zet & Anabella Trigila.\n\nWe thank the following people for their extensive assistance in the development of this pipeline:\n\n- Saul Pierotti\n- Eugenia Fontecha\n- Matias Romero Victorica\n- Hemanoel Passarelli\n\n## Contributions and Support\n\nIf you would like to contribute to this pipeline, please see the [contributing guidelines](.github/CONTRIBUTING.md). Further development tips can be found in the [development documentation](docs/development.md).\n\nFor further information or help, don't hesitate to get in touch on the [Slack `#phaseimpute` channel](https://nfcore.slack.com/channels/phaseimpute) (you can join with [this invite](https://nf-co.re/join/slack)).\n\n## Citations\n\nIf you use nf-core/phaseimpute for your analysis, please cite it using the following doi: [10.5281/zenodo.14329225](https://doi.org/10.5281/zenodo.14329225)\n\nAn extensive list of references for the tools used by the pipeline, including QUILT, GLIMPSE, and STITCH, can be found in the [`CITATIONS.md`](CITATIONS.md) file.\n\nYou can cite the `nf-core` publication as follows:\n\n> **The nf-core framework for community-curated bioinformatics pipelines.**\n>\n> Philip Ewels, Alexander Peltzer, Sven Fillinger, Harshil Patel, Johannes Alneberg, Andreas Wilm, Maxime Ulysse Garcia, Paolo Di Tommaso & Sven Nahnsen.\n>\n> _Nat Biotechnol._ 2020 Feb 13. doi: [10.1038/s41587-020-0439-x](https://dx.doi.org/10.1038/s41587-020-0439-x).\n",
0 commit comments