GenomicRanges for Python.
Project description
pyranges
Introduction
Pyranges is a Python library with a Rust backend for efficient and intuitive manipulation of genomics data, particularly genomic intervals (like genes, genomic features, or reads). The library is optimized for fast querying and manipulation of genomic annotations. It enables intuitive and highly efficient pipelines for genomic analysis.
"Finally ... This was what Python badly needed for years." - Heng Li
Version 1.x
This is version 1.x of pyranges. It is a complete rewrite of the original pyranges library, soon to replace the "default" original one (version 0). If you are a v0 user, check the migration guide in the documentation.
Documentation
The pyranges documentation, including installation instructions, API, tutorial, and how-to-pages, is available at https://pyranges1.readthedocs.io/
Recent Changelog
# 1.2.0 (29.01.26)
- module name changed from pyranges to pyranges1, to allow co-existing with pyranges (v0) in same env
# 1.1.9 (26.01.26)
- pandas dependency bound to v2. This is in response to pandas 3.0.0 being released, breaking our doctests.
# 1.1.8 (30.12.25)
- to_gtf and to_gff3: fix bug where 'phase' (gtf) and 'frame' (gff3) are erroneously added to attributes field
# v1.1.7 (16.12.25)
- window_ranges: fix sort order issue in when using by (#98 and #105)
- window_ranges: added argument add_window_id, updated documentation
Install
Pyranges 1.x requires python ≥3.12. Minimal installation:
pip install pyranges1
Installation including all optional dependencies:
pip install pyranges1[all]
Details at https://pyranges1.readthedocs.io/en/latest/installation.html
Features
- fast
- memory-efficient
- featureful
- pythonic/pandastic
Paper/Cite
For v1:
Stovner EB, Ticó M, Muñoz del Campo E, Pallarès-Albanell J, Chawla K, Sætrom P, Mariotti M (2025) Pyranges v1: a Python framework for ultrafast sequence interval operations. bioRxiv 2025.12.11.693639; doi: https://doi.org/10.64898/2025.12.11.693639
For v0:
Stovner EB, Sætrom P (2020) PyRanges: efficient comparison of genomic intervals in Python. Bioinformatics 36(3):918-919 http://dx.doi.org/10.1093/bioinformatics/btz615
Supporting pyranges
- most importantly, cite pyranges if you use it. It is the main metric funding sources care about.
- use pyranges in Stack Overflow/biostars questions and answers
- star the repo (possibly important for github visibility and as a proxy for project popularity)
Asking for help
If you encounter bugs, or the documentation is not enough a cannot accomplish a specific task of interest, or if you'd like new features implemented, open an Issue at github: https://github.com/pyranges/pyranges/issues
Contributing to pyranges
Pyranges accepts code contributions in form of pull request. For details, visit https://pyranges1.readthedocs.io/developer_guide.html
Cheatsheet
(The cheatsheet above was created with pyrangeyes, a companion graphical library: https://pyrangeyes.readthedocs.io/)
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pyranges1-1.2.0.tar.gz.
File metadata
- Download URL: pyranges1-1.2.0.tar.gz
- Upload date:
- Size: 910.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
36228b1b1f28727331b53ed8923283f117040c080053499e3c16c078d5d2efdf
|
|
| MD5 |
7225ebd672bab0534ae85b85dd05baae
|
|
| BLAKE2b-256 |
7bbf76f10c721cec325ed41c861304fef794b6859ebbf58f71e18f497753bf77
|
File details
Details for the file pyranges1-1.2.0-py3-none-any.whl.
File metadata
- Download URL: pyranges1-1.2.0-py3-none-any.whl
- Upload date:
- Size: 939.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
110eeee1b8be50c37ae9185d5425f1127e4a547527d9a1a0db74002bb843b61b
|
|
| MD5 |
beff2becba926a90c623585afa1b1d14
|
|
| BLAKE2b-256 |
4dfc7c8e640e88e584b512c5b924545ccea3a42c57b56caa6afd844d0ffdebb3
|