Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

liftover

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

liftover

Package for converting between genome build coordinates

  • 1.3.2
  • PyPI
  • Socket score

Maintainers
1

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')

FAQs


Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc