Skip to main content

Converts genotype data stored in plink's PED+MAP format from one genome build to another, using liftOver

Project description

PLINKLiftOver

Build status Python Version Dependencies Status

Code style: black Security: bandit Semantic Versions License Alt

PLINKLiftOver is a utility enabling liftOver to work on genomics files from PLINK, allowing one to update the coordinates from one genome reference version to another.

## Installation

PLINKLiftOver requires

  • Python 3.8
  • The command line version of liftOver, installed and on the system path
  • An appropriate chain file
  • The MAP file from a PLINK dataset
pip install -U plinkliftover

or install with the development version with

pip install -U git+https://github.com/milescsmith/plinkliftover.git

Usage

Usage: plinkliftover [OPTIONS] MAPFILE CHAINFILE

  Converts genotype data stored in plink's PED+MAP format from one genome
  build to another, using liftOver.

Arguments:
  MAPFILE    The plink MAP file to `liftOver`.  [required]
  CHAINFILE  The location of the chain files to provide to `liftOver`.
             [required]

Options:
  --pedfile TEXT             Optionally remove "unlifted SNPs" from the plink
                             PED file after running `liftOver`.
  --datfile TEXT             Optionally remove 'unlifted SNPs' from a data
                             file containing a list of SNPs (e.g. for
                             --exclude or --include in `plink`)
  --prefix TEXT              The prefix to give to the output files.
  --liftoverexecutable TEXT  The location of the `liftOver` executable.
  -v, --version              Prints the version of the plinkliftover package.
  --help                     Show this message and exit.

For example

plinkliftover updating.map hg19ToHg38.over.chain.gz

Note!

By default, PLINK 2.0 does not use/create the required MAP file. It can be generated using PLINK 1.9 by

plink --bfile original --recode --out to_update

where original is the prefix for the bed/bim/fam files and to_update is the prefix to give the new files.

🛡 License

License

This project is licensed under the terms of the GNU GPL v3.0 license. See LICENSE for more details.

📃 Citation

@misc{plinkliftover,
  author = {Miles Smith <miles-smith@omrf.org>},
  title = {Awesome `plinkliftover` is a Python cli/package created with https://github.com/TezRomacH/python-package-template},
  year = {2021},
  publisher = {GitHub},
  journal = {GitHub repository},
  howpublished = {\url{https://github.com/milescsmith/plinkliftover}}
}

Credits

This project was generated with python-package-template.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

plinkliftover-0.2.0.tar.gz (10.6 kB view hashes)

Uploaded Source

Built Distribution

plinkliftover-0.2.0-py3-none-any.whl (9.9 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page