Skip to main content

pitools: A phasing and imputation tools for NGS data.

Introduction

pitools is a phasing and imputation tools for NGS data, which is the main core of imputation server: https://imputation.cngb.org/. You can use pitools as your own imputation pipeline in your local Linux cluster.

Quick start

pitools use eagle for phasing and Minimac3 for imputation.

Installation

Install the released version by pip:

pip install pitools

Or you may instead want to install the development version from github, by running:

pip install git+git://github.com/ShujiaHuang/pitools.git#egg=pitools

This command will install pitools in your system and you can use pitools in your commandline.

Usage

You can find all the parameter for imputation process by running pitools impute --help:

usage: pitools impute [-h] -C CONFIG [-M IMPUTE_METHOD] [-P PHASE_METHOD] -I IN_VCF
                 -O OUT_PREFIX --refpanel-version REFPANEL --reference-build
                 REFBUILD [--unprephase] [--regions chr:start-end]
                 [--nCPU NCPU]

optional arguments:
  -h, --help            show this help message and exit
  -C CONFIG, --conf CONFIG
                        YAML configuration file specifying details information
                        for imputation
  -M IMPUTE_METHOD, --methods IMPUTE_METHOD
                        Tool for imputation. [minimac]
  -P PHASE_METHOD, --prephase-method PHASE_METHOD
                        Tool for pre-phase before imputation. [eagle]
  -I IN_VCF, --input IN_VCF
                        Input one VCF file to analyze. Required
  -O OUT_PREFIX, --outprefix OUT_PREFIX
                        Prefix for output files. Required
  --refpanel-version REFPANEL
                        The version of haplotype data for reference panel.
                        Required
  --reference-build REFBUILD
                        The build version of reference, e.g: GRCh37
  --unprephase          Do not perform pre-phased before the imputation
                        process.
  --regions chr:start-end
                        Skip positions which not in these regions. This
                        parameter could be a list of comma deleimited genome
                        regions(e.g.: chr:start-end,chr:start-end)
  --nCPU NCPU           Number of threads. [1]

Configuration file

pitools needs a configuration file for setting the path of phasing program, imputation program, reference version and reference panel. Here’s one of the examples for how to create a config- uration file: config.yaml.

Now you can use pitools as your powerful imputation pipeline, once you have finished the setting.

Examples

This command would be enough for most of your jobs.

pitools impute -C config.yaml \
    -I your.vcf.gz \
    -O test_outprefix \
    --refpanel-version 1000G_P3_GRCh37 \
    --reference-build GRCh37 \
    --nCPU 4

What if you just want to preform the imputed process in some specific regions. Here is an example for running pitools in genome region: 21:38347375-38500731 and 22:17203103-17439826.

pitools impute -C config.yaml \
    -I your.vcf.gz \
    -O test_outprefix \
    --refpanel-version 1000G_P3_GRCh37 \
    --reference-build GRCh37 \
    --regions  21:38347375-38500731,22:17203103-17439826 \
    --nCPU 4

PI will perform pre-phasing automatically before perform the imputation process. But sometimes your input VCF file has been phased already. And you don’t want to run it any more then you can set --unprephase argument to skip that process.

pitools impute -C config.yaml \
    -I your.vcf.gz \
    -O test_outprefix \
    --refpanel-version 1000G_P3_GRCh37 \
    --reference-build GRCh37 \
    --unprephase \
    --nCPU 4

Metadata

Release files for pitools 1.0.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pitools 1.0.1
File Size Uploaded Provenance Actions
pitools-1.0.1.tar.gz 13.7 kB Without provenance Details for pitools-1.0.1.tar.gz

Release files / pitools-1.0.1.tar.gz

Download URL pitools-1.0.1.tar.gz
Size 13.7 kB
Tags Source
SHA-256 checksum
How to use checksums
8a5e33b18f6f29efdc717f782e937dd83810007460c395ad2debbfd5d57dd4e5
BLAKE2b-256 checksum
How to use checksums
0b8500fe213d21b0c721307f3a87828371123de915def0f6e8fa16f23f5a58e5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via Python-urllib/2.7

Security for pitools 1.0.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

1.0.1 This release

1 release file No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page