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', one_based=True)
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', one_based=True)
converter[chrom][pos]

# you can also specify an alternative website to load chain files from
converter = get_lifter('hg19', 'hg38', chain_server='https://www.example.com')

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.3.1.tar.gz (218.1 kB view hashes)

Uploaded Source

Built Distributions

liftover-1.3.1-cp312-cp312-win_amd64.whl (100.4 kB view hashes)

Uploaded CPython 3.12 Windows x86-64

liftover-1.3.1-cp312-cp312-win32.whl (91.6 kB view hashes)

Uploaded CPython 3.12 Windows x86

liftover-1.3.1-cp312-cp312-musllinux_1_1_x86_64.whl (1.9 MB view hashes)

Uploaded CPython 3.12 musllinux: musl 1.1+ x86-64

liftover-1.3.1-cp312-cp312-musllinux_1_1_i686.whl (1.9 MB view hashes)

Uploaded CPython 3.12 musllinux: musl 1.1+ i686

liftover-1.3.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.1 MB view hashes)

Uploaded CPython 3.12 manylinux: glibc 2.17+ x86-64

liftover-1.3.1-cp312-cp312-manylinux_2_12_i686.manylinux2010_i686.manylinux_2_17_i686.manylinux2014_i686.whl (1.0 MB view hashes)

Uploaded CPython 3.12 manylinux: glibc 2.12+ i686 manylinux: glibc 2.17+ i686

liftover-1.3.1-cp312-cp312-macosx_11_0_arm64.whl (73.0 kB view hashes)

Uploaded CPython 3.12 macOS 11.0+ ARM64

liftover-1.3.1-cp311-cp311-win_amd64.whl (100.2 kB view hashes)

Uploaded CPython 3.11 Windows x86-64

liftover-1.3.1-cp311-cp311-win32.whl (91.1 kB view hashes)

Uploaded CPython 3.11 Windows x86

liftover-1.3.1-cp311-cp311-musllinux_1_1_x86_64.whl (1.9 MB view hashes)

Uploaded CPython 3.11 musllinux: musl 1.1+ x86-64

liftover-1.3.1-cp311-cp311-musllinux_1_1_i686.whl (1.9 MB view hashes)

Uploaded CPython 3.11 musllinux: musl 1.1+ i686

liftover-1.3.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.1 MB view hashes)

Uploaded CPython 3.11 manylinux: glibc 2.17+ x86-64

liftover-1.3.1-cp311-cp311-manylinux_2_12_i686.manylinux2010_i686.manylinux_2_17_i686.manylinux2014_i686.whl (1.0 MB view hashes)

Uploaded CPython 3.11 manylinux: glibc 2.12+ i686 manylinux: glibc 2.17+ i686

liftover-1.3.1-cp311-cp311-macosx_11_0_arm64.whl (72.6 kB view hashes)

Uploaded CPython 3.11 macOS 11.0+ ARM64

liftover-1.3.1-cp310-cp310-win_amd64.whl (100.0 kB view hashes)

Uploaded CPython 3.10 Windows x86-64

liftover-1.3.1-cp310-cp310-win32.whl (90.9 kB view hashes)

Uploaded CPython 3.10 Windows x86

liftover-1.3.1-cp310-cp310-musllinux_1_1_x86_64.whl (1.9 MB view hashes)

Uploaded CPython 3.10 musllinux: musl 1.1+ x86-64

liftover-1.3.1-cp310-cp310-musllinux_1_1_i686.whl (1.9 MB view hashes)

Uploaded CPython 3.10 musllinux: musl 1.1+ i686

liftover-1.3.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.0 MB view hashes)

Uploaded CPython 3.10 manylinux: glibc 2.17+ x86-64

liftover-1.3.1-cp310-cp310-manylinux_2_12_i686.manylinux2010_i686.manylinux_2_17_i686.manylinux2014_i686.whl (1.0 MB view hashes)

Uploaded CPython 3.10 manylinux: glibc 2.12+ i686 manylinux: glibc 2.17+ i686

liftover-1.3.1-cp310-cp310-macosx_11_0_arm64.whl (72.5 kB view hashes)

Uploaded CPython 3.10 macOS 11.0+ ARM64

liftover-1.3.1-cp39-cp39-win_amd64.whl (100.4 kB view hashes)

Uploaded CPython 3.9 Windows x86-64

liftover-1.3.1-cp39-cp39-win32.whl (91.4 kB view hashes)

Uploaded CPython 3.9 Windows x86

liftover-1.3.1-cp39-cp39-musllinux_1_1_x86_64.whl (1.9 MB view hashes)

Uploaded CPython 3.9 musllinux: musl 1.1+ x86-64

liftover-1.3.1-cp39-cp39-musllinux_1_1_i686.whl (1.9 MB view hashes)

Uploaded CPython 3.9 musllinux: musl 1.1+ i686

liftover-1.3.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.0 MB view hashes)

Uploaded CPython 3.9 manylinux: glibc 2.17+ x86-64

liftover-1.3.1-cp39-cp39-manylinux_2_12_i686.manylinux2010_i686.manylinux_2_17_i686.manylinux2014_i686.whl (1.0 MB view hashes)

Uploaded CPython 3.9 manylinux: glibc 2.12+ i686 manylinux: glibc 2.17+ i686

liftover-1.3.1-cp39-cp39-macosx_11_0_arm64.whl (73.1 kB view hashes)

Uploaded CPython 3.9 macOS 11.0+ ARM64

liftover-1.3.1-cp38-cp38-win_amd64.whl (100.5 kB view hashes)

Uploaded CPython 3.8 Windows x86-64

liftover-1.3.1-cp38-cp38-win32.whl (91.4 kB view hashes)

Uploaded CPython 3.8 Windows x86

liftover-1.3.1-cp38-cp38-musllinux_1_1_x86_64.whl (1.9 MB view hashes)

Uploaded CPython 3.8 musllinux: musl 1.1+ x86-64

liftover-1.3.1-cp38-cp38-musllinux_1_1_i686.whl (1.9 MB view hashes)

Uploaded CPython 3.8 musllinux: musl 1.1+ i686

liftover-1.3.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.0 MB view hashes)

Uploaded CPython 3.8 manylinux: glibc 2.17+ x86-64

liftover-1.3.1-cp38-cp38-manylinux_2_12_i686.manylinux2010_i686.manylinux_2_17_i686.manylinux2014_i686.whl (1.0 MB view hashes)

Uploaded CPython 3.8 manylinux: glibc 2.12+ i686 manylinux: glibc 2.17+ i686

liftover-1.3.1-cp38-cp38-macosx_11_0_arm64.whl (73.6 kB view hashes)

Uploaded CPython 3.8 macOS 11.0+ ARM64

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