pyliftover

Pure-python implementation of UCSC liftOver genome coordinate conversion

https://github.com/konstantint/pyliftover

Science Score: 13.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
  • DOI references
  • Academic publication links
  • Committers with academic emails
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (13.0%) to scientific vocabulary
Last synced: 11 months ago · JSON representation

Repository

Pure-python implementation of UCSC liftOver genome coordinate conversion

Basic Info
  • Host: GitHub
  • Owner: konstantint
  • License: mit
  • Language: Python
  • Default Branch: master
  • Homepage:
  • Size: 1.34 MB
Statistics
  • Stars: 97
  • Watchers: 5
  • Forks: 13
  • Open Issues: 2
  • Releases: 0
Created over 13 years ago · Last pushed over 2 years ago
Metadata Files
Readme Changelog License

README.rst

============================================================================
Pure-python implementation of UCSC ``liftOver`` genome coordinate conversion
============================================================================

.. image:: https://travis-ci.org/konstantint/pyliftover.png?branch=master   :target: https://travis-ci.org/konstantint/pyliftover

PyLiftover is a library for quick and easy conversion of genomic (point) coordinates between different assemblies.

It uses the same logic and coordinate conversion mappings as the UCSC `liftOver tool `_.

As of current version (0.2), PyLiftover only does conversion of point coordinates, that is, 
unlike ``liftOver``, it does not convert ranges, nor does it provide any special facilities to work with BED files.
For single-point coordinates it produces exactly the same output as ``liftOver`` (verified with at least the ``hg17ToHg18.over.chain.gz`` file for now).

Installation
------------

The simplest way to install the package is via ``easy_install`` or ``pip``::

    $ easy_install pyliftover

Usage
-----
The primary usage example, supported by the library is the following::

    from pyliftover import LiftOver
    lo = LiftOver('hg17', 'hg18')
    lo.convert_coordinate('chr1', 1000000)

The first line will automatically download the hg17-to-hg18 coordinate conversion `chain file `_ from UCSC,
unless it is already cached or available in the current directory. Alternatively, you may provide your own chain file::

    lo = LiftOver('hg17ToHg18.over.chain.gz')
    lo.convert_coordinate('chr1', 1000000, '-')

The result of ``lo.convert_coordinate`` call is either ``None`` (if the source chromosome name is unrecognized) or a list of target positions in the
new assembly. The list may be empty (locus is deleted in the new assembly), have a single element (locus matched uniquely), or, in principle, 
have multiple elements (although this is probably a rare occasion for most default intra-species genomic conversions).
Note that coordinates in the tool are 0-based. That is, a position that you would refer to in the genome browser by ``chr1:10`` 
corresponds to coordinate ``9`` in PyLiftover's terms.

Although you may try to apply the tool with arbitrary chain files, like the original ``liftOver`` tool, it makes most sense for conversion of 
coordinates between different assemblies of the same species.


See also
--------

* Blog post: http://fouryears.eu/2013/02/25/the-curse-of-genomic-coordinates/
* Report issues and submit fixes at Github: https://github.com/konstantint/pyliftover

Owner

  • Name: Konstantin Tretyakov
  • Login: konstantint
  • Kind: user

GitHub Events

Total
  • Watch event: 4
Last Year
  • Watch event: 4

Committers

Last synced: about 1 year ago

All Time
  • Total Commits: 17
  • Total Committers: 3
  • Avg Commits per committer: 5.667
  • Development Distribution Score (DDS): 0.118
Past Year
  • Commits: 0
  • Committers: 0
  • Avg Commits per committer: 0.0
  • Development Distribution Score (DDS): 0.0
Top Committers
Name Email Commits
Konstantin Tretyakov kt@u****e 15
glebk g****v@g****m 1
NizanHellman 5****n 1
Committer Domains (Top 20 + Academic)
ut.ee: 1

Issues and Pull Requests

Last synced: 11 months ago

All Time
  • Total issues: 17
  • Total pull requests: 2
  • Average time to close issues: about 1 month
  • Average time to close pull requests: 1 day
  • Total issue authors: 14
  • Total pull request authors: 2
  • Average comments per issue: 2.24
  • Average comments per pull request: 1.0
  • Merged pull requests: 2
  • Bot issues: 0
  • Bot pull requests: 0
Past Year
  • Issues: 1
  • Pull requests: 0
  • Average time to close issues: 7 days
  • Average time to close pull requests: N/A
  • Issue authors: 1
  • Pull request authors: 0
  • Average comments per issue: 3.0
  • Average comments per pull request: 0
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
  • iljungr (3)
  • rkimoakbioinformatics (2)
  • Shicheng-Guo (1)
  • Dearwunan (1)
  • wyatt-t-clark (1)
  • ofrei (1)
  • nicokrez (1)
  • zhangtaowhu (1)
  • TeriForey (1)
  • yvancluet (1)
  • LuoPangpang (1)
  • matty234 (1)
  • Seb-Leb (1)
  • Peter-J-Freeman (1)
Pull Request Authors
  • NizanHellman (1)
  • glebkuznetsov (1)
Top Labels
Issue Labels
Pull Request Labels

Packages

  • Total packages: 1
  • Total downloads:
    • pypi 15,794 last-month
  • Total docker downloads: 121
  • Total dependent packages: 13
  • Total dependent repositories: 51
  • Total versions: 5
  • Total maintainers: 1
pypi.org: pyliftover

Pure-python implementation of UCSC ``liftOver`` genome coordinate conversion.

  • Versions: 5
  • Dependent Packages: 13
  • Dependent Repositories: 51
  • Downloads: 15,794 Last month
  • Docker Downloads: 121
Rankings
Dependent packages count: 1.1%
Dependent repos count: 2.1%
Downloads: 2.3%
Docker downloads count: 3.1%
Average: 4.4%
Stargazers count: 7.7%
Forks count: 9.8%
Maintainers (1)
kt
Last synced: 11 months ago

Dependencies

setup.py pypi