The pyranges1 documentation

Pyranges is a Python library specifically designed 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.

Pyranges is open source, and hosted at github: https://github.com/pyranges/pyranges1/

Pyranges is developed by Endre Bakken Stovner and by Marco Mariotti’s lab.

This documentation refers to the version 1 of pyranges, which introduces a new API and a new data structure compared to version 0, still the ‘default’, soon to be deprecated. If you are a pyranges1 v0 user, check this guide to migrate to v1.

While we recommend using pyranges1 as Python library, alternatively, the pyranger command-line tool allows you to access the same functionalities from the command line, without writing any Python code.

Citation

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

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

Documentation outline

  1. 🛠️ Installation instructions

  2. 📖 The tutorial, recommended for all new users

  3. 🧰 The how-to pages, where functionalities are grouped by topic

  4. 📑 The API reference, where all methods are explained in detail

  5. 🚀 The cheatsheet, a quick reference for the most common operations

  6. 💻 The pyranger command-line tool, for those who prefer the command line

  7. 🧑‍💻 The developer guide, to follow in order to contribute to PyRanges

  8. 🔄 The guide to migrate to v1, for existing users of PyRanges v0

Indices