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.14.tar.gz (186.8 kB view details)

Uploaded Source

File details

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

File metadata

  • Download URL: liftover-1.1.14.tar.gz
  • Upload date:
  • Size: 186.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.9.12

File hashes

Hashes for liftover-1.1.14.tar.gz
Algorithm Hash digest
SHA256 d2a4a4178812acfd9339e7c96dd75e4ccbc7480119649ef3cc96263a567bcbc2
MD5 8273c848e4bc0f5082632b2dba06f509
BLAKE2b-256 5499f81cc3a63d3b1a6dfb634519eae952894af49475db7e75912cbc13339c7e

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