Skip to main content

Package for converting between genome build coordinates

Project description

travis

python liftover utility

Converts point coordinates between genome assemblies. Inspired by pyliftover, this offers a few advantages:

  • ~5X faster, and lower memory requirements, as loading the chain file and converting coordinates is implemented in c++.
  • dictionary style conversion, as in access converted coordinates via converter[chrom][pos]

Installation

Install via pip: pip install liftover

Usage

from liftover import get_lifter

converter = get_lifter('hg19', 'hg38')
chrom = '1'
pos = 103786442
converter[chrom][pos]

converter.query(chrom, pos)

# alternatively create a converter directly from a chainfile
from liftover import ChainFile
converter = ChainFile('/home/user/hg18ToHg38.over.chain.gz', 'hg18', 'hg38')
converter[chrom][pos]

Project details


Download files

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

Files for liftover, version 1.1.3
Filename, size File type Python version Upload date Hashes
Filename, size liftover-1.1.3.tar.gz (81.6 kB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page