Package for converting between genome build coordinates
Project description
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
Release history Release notifications | RSS feed
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.10.tar.gz
(83.2 kB
view details)
File details
Details for the file liftover-1.1.10.tar.gz.
File metadata
- Download URL: liftover-1.1.10.tar.gz
- Upload date:
- Size: 83.2 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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
529e373478eec1cc339d28292a10aad4c488a8f66d451853316b42d1c9c24e5a
|
|
| MD5 |
4b165e57fc13065ef8da35e8a56c1ca8
|
|
| BLAKE2b-256 |
788ec6f6d193d5ecdedd79d4fcde91115c260b9bf654428d91a3db8f6ad0f540
|