
pybio is a comprehensive Python framework designed to streamline genomics operations. It offers a direct interface to Ensembl genome assemblies and annotations, while also accommodating custom genomes via FASTA/GTF inputs. The primary objective of pybio is to simplify genome management. It achieves this by providing automatic download of Ensembl genome assemblies and annotation, provides Python genomic feature search and sequence retrieval from the managed genomes, STAR indexing and mapping and more.
Install and download + prepare human genome:
# Option 1: install over PyPi
pip install pybio
# Option 2: install from this repository
pip install git+https://github.com/grexor/pybio.git@master
# Option 3: use over singularity / apptainer / Docker (only if you don't need python imports)
singularity run docker://ghcr.io/grexor/pybio:master pybio
# Download and process homo sapiens genome
pybio genome homo_sapiens
Import a custom genome from FASTA/GTF files:
pybio genome custom_species -fasta /path/to/fasta -gtf /path/to/gtf -genome_version custom_genome_v1
Search genome features (exons, transcripts, genes) from Python:
import pybio
result = pybio.core.genomes.annotate("homo_sapiens", "1", "+", 11012344)
genes, transcripts, exons, UTR5, UTR3 = result
Retrieve genomic sequences from Python:
import pybio
seq = pybio.core.genomes.seq("homo_sapiens", "1", "+", 450000, -20, 20)
Check the documentation for more examples.
Full documentation, including installation, a quick start guide, and reference pages for genomes, read mapping, motif search, CLIP/bedGraph data and the command line, is available at:
pybio is developed and supported by Gregor Rot.
Use the issues page to report issues and leave suggestions.
Change log
0.8.8: 17 September 2026
- migrated documentation to a mkdocs-material site (grexor.github.io/pybio), retiring the PDF/Google Docs manual
- added STARsolo support for single-cell alignment
- added caching of genome annotation lookups for faster repeated queries
- removed legacy
genome_species.tab, superseded byensembl.json
0.8.7: 30 June 2026
- refreshed Ensembl database to release 116
0.8.6: 30 June 2026
genomes.jsonnow auto-updates after each genome install
0.8.5: 12 June 2026
- keep a
.gzcopy of FASTA files alongside the decompressed genome assembly
0.8.4: 28 October 2025
- moved
os.systemcalls tosubprocess - fixed direct calling of
python3to usesys.executable
0.8: May 2025
- aimux: added short-read paired-end sequencing demultiplexing tool
0.7: February 2025
alignIntronMaxsupport for STAR- other small fixes
0.6.3: December 2024
- updated
setup.pyto use an entry point instead of a script - removed
pybioscripts
0.6: November 2024
- updated Ensembl search and genome versioning offline
- updated custom genome interface
0.5: May 2024
- refreshed Ensembl (112) and Ensembl Genomes (58) database
0.4: April 2024
- refreshed Ensembl (111) and Ensembl Genomes (58) database
0.3.12: November 2023
- updated docs
If you are using pybio in your research, please cite:
Rot, G., Wehling, A., Schmucki, R., Berntenis, N., Zhang, J. D., & Ebeling, M. (2024)
splicekit : an integrative toolkit for splicing analysis from short-read RNA-seq
Bioinformatics Advances, 4(1). https://doi.org/10.1093/bioadv/vbae121