Skip to main content

Package for converting between genome build coordinates

Project description

liftover

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]

# other synonyms for the lift call
converter.convert_coordinate(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.

Source Distribution

liftover-1.1.9.tar.gz (82.6 kB view details)

Uploaded Source

File details

Details for the file liftover-1.1.9.tar.gz.

File metadata

  • Download URL: liftover-1.1.9.tar.gz
  • Upload date:
  • Size: 82.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.1.3.post20200330 requests-toolbelt/0.9.1 tqdm/4.45.0 CPython/3.7.6

File hashes

Hashes for liftover-1.1.9.tar.gz
Algorithm Hash digest
SHA256 12c7d919a8d8d3691eda528c37b0dab1fb5dc89c54a5defd9a9dfe75a55129c1
MD5 266859fc4d315089f9b35761ce0d1b87
BLAKE2b-256 9917e25fb9082da849606c9c1141c466ea23404d9fc4a3f4d1565e500fa114b7

See more details on using hashes here.

Supported by

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