biocommons.seqrepo
Non-redundant, compressed, journalled, file-based storage for biological sequences
What it is and what it does
SeqRepo is a Python package for managing local collections of biological sequences with efficient, non-redundant storage. It solves the problem of maintaining multiple reference genomes and sequence databases locally by providing a compressed, indexed repository that supports fast random access to sequence regions. Sequences are stored using Block GZipped Format (BGZF) compression and identified via multiple namespace conventions (RefSeq, Ensembl, hash digests), allowing callers to refer to sequences using familiar accessions like NM_000551.3 or GRCh38:1.
The package is designed for bioinformatics workflows where reproducible access to versioned sequence snapshots is critical. It supports timestamped, read-only snapshots that can be mirrored from public sources or maintained locally via CLI or API. Dependencies include bioutils, pysam (for BGZF access), requests, yoyo-migrations, and utility libraries like coloredlogs and tqdm. The repository structure uses SHA-512 truncation for deduplication and SQLite for alias mapping, making it suitable for chromosome-scale sequences and multi-snapshot deployments.
Use it for:
- Build a local mirror of RefSeq and Ensembl genomes for reproducible variant annotation pipelines
- Resolve sequence identifiers from multiple naming conventions to a canonical sequence in a single query
- Retrieve arbitrary slices of large reference genomes without loading entire sequences into memory
- Maintain versioned snapshots of reference data for compliance or reproducibility in clinical genomics workflows
- Serve sequences via REST API using seqrepo-rest-service for distributed bioinformatics applications
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
SeqRepo stores and retrieves biological sequences in a non-redundant, compressed, indexed repository, supporting fast slicing and multiple sequence identifiers including RefSeq accessions, Ensembl IDs, and hash-based aliases.
Yes, if you need local, versioned biological sequence storage for bioinformatics pipelines. The package is well-maintained (active commits, no vulnerabilities), has low install friction, and solves a real problem in genomics workflows. Caveat: last release was 513 days ago and development is aging; verify that the snapshot versions and reference data you need are current before committing to production use.
Install
biocommons-seqrepo on PyPI
pip
pip install biocommons-seqrepouv
uv add biocommons-seqrepopoetry
poetry add biocommons-seqrepoInstalling biocommons.seqrepo
Before you install
Low install friction with a pure-Python wheel and eight runtime dependencies. Maintenance status is aging—last release was 513 days ago—but the repository remains active with recent commits and no archived status.
License in practice
Licensed under Apache License 2.0 (permissive), allowing commercial and private use with minimal restrictions.
Quickstart
pip install biocommons.seqrepo
from biocommons.seqrepo import SeqRepo
sr = SeqRepo("/usr/local/share/seqrepo/latest")
sequence_slice = sr["NC_000001.11"][780000:780020]
Requires rsync binary for CLI-based snapshot acquisition; writing sequences requires bgzip from htslib (Ubuntu: install tabix package). Mac users must install rsync from HomeBrew as openrsync lacks required functions.
Verify before relying
- Performance characteristics for very large sequence queries or concurrent access patterns
- Compatibility with non-Ubuntu/non-macOS systems beyond stated development platforms
- Scalability limits for repository size or number of snapshots
Package facts
| License | not declared (permissive) |
| Python support | supports the current Python release (>=3.10) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 8 — bioutils, coloredlogs, ipython, pysam, requests, tqdm, typing-extensions, yoyo-migrations |
| Maintenance | aging — 513 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 78,356/month — #14,449 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: biocommons.seqrepo-0.6.11-py3-none-any.whl
Tags
More Database packages
psycopg2-binary is a PostgreSQL database…
copyleft · top 1,000 on PyPI
redisPython client library for connecting to and…
permissive · top 1,000 on PyPI
ydbYDB Python SDK is the official client library…
permissive · top 1,000 on PyPI
snowflake-connector-pythonConnects Python applications to Snowflake data…
permissive · top 1,000 on PyPI
sqlparsesqlparse tokenizes SQL text into a tree of…
permissive · top 1,000 on PyPI
dbt-adaptersProvides base adapter protocols and shared…
permissive · top 1,000 on PyPI
pyensemblPyEnsembl provides a Python interface to query…
permissive · top 15,000 on PyPI
biotiteBiotite provides a unified Python library for…
permissive · top 5,000 on PyPI
deepbiopDeepBioP is a deep learning preprocessing…
permissive · top 15,000 on PyPI
bx-pythonbx-python provides Python classes and utilities…
permissive · top 15,000 on PyPI
pyfaidxProvides fast random access to subsequences in…
permissive · top 15,000 on PyPI
refgenconfManages standardized configuration for…
permissive · top 15,000 on PyPI
refgenieRefgenie manages standardized folder structures…
permissive · top 15,000 on PyPI
scikit-bioscikit-bio provides data structures,…
permissive · top 15,000 on PyPI
biom-formatReads, writes, and manipulates Biological…
permissive · top 15,000 on PyPI
bioversionsRetrieves and caches the current version…
permissive · top 15,000 on PyPI