Registry / data / biocommons-seqrepo

biocommons-seqrepo

JSON →
library0.6.11pypypi✓ verified 84d ago

Non-redundant, compressed, journalled, file-based storage for biological sequences. Current version 0.6.11, requires Python >=3.10. Released under Apache 2.0, maintained primarily by the biocommons community. Updates are occasional, with bug fixes and dependency updates.

pip install biocommons-seqrepo
INSTALL
IMPORT
SIG · BIOCOMMONS-SEQREPO
B
biocommons-seqrepo
datapythonv0.6.11
Install
7.0s avg
Import
489ms
Disk
159MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v0.6.11 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.103.95 runs
installs and imports cleanly · install 0.0s · import 0.504s · 146MB
glibc
py 3.103.95 runs
installs and imports cleanly · install 7.0s · import 0.474s · 160MB
159MB installed
● package 159MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

SeqRepo
from biocommons.seqrepo import SeqRepo
from seqrepo import SeqRepo
top-level package is biocommons.seqrepo, not seqrepo
SeqRepo
from biocommons.seqrepo import SeqRepo
from biocommons_seqrepo import SeqRepo
hyphenated package name maps to biocommons.seqrepo, not underscore

Basic usage: create a SeqRepo instance pointing to a local seqrepo data directory and fetch sequences by accession.

from biocommons.seqrepo import SeqRepo # Use a local directory (or set SEQREPO_ROOT_DIR env var) sr = SeqRepo(root_dir="/path/to/seqrepo", writeable=True) # Fetch a sequence by NCBI accession (e.g., NM_000558.4) seq = sr.fetch("NM_000558.4") # returns a SeqRecord print(seq.id, len(seq.seq))
seqrepo --version
Debug
Known issues
breakingPython 3.9 and older are no longer supported since v0.6.11. Requires Python >=3.10.
fix
Upgrade to Python 3.10 or later.
affects: >=0.6.11
deprecatedThe old 'seqrepo' CLI (installed via setup.py) was replaced by a new entry point in v0.6.8. Use 'seqrepo' command directly (installed via pip).
fix
Use 'seqrepo --help' to see CLI commands; no more 'python -m seqrepo'.
affects: >=0.6.8
gotchaSeqRepo instances are read-only by default. To write or update, you must pass writeable=True to the constructor.
fix
Explicitly set writeable=True when creating a SeqRepo for writing.
affects: all
gotchaAccession lookup is case-sensitive. 'NM_000558.4' works, 'nm_000558.4' does not.
fix
Ensure correct case for accessions.
affects: all
gotchaWhen using a remote seqrepo instance (e.g., via rsync), ensure you have proper network access and the remote path is correctly configured via environment variables or constructor arguments.
fix
Set SEQREPO_ROOT_DIR or use the root_dir parameter with the correct path.
affects: all
Errors
Common errors & fixes
ModuleNotFoundError: No module named 'biocommons.seqrepo'
Package not installed or installed under a different name.
fix
pip install biocommons-seqrepo
AttributeError: module 'biocommons.seqrepo' has no attribute 'SeqRepo'
Outdated version (<0.6.0) or incorrect import path.
fix
Upgrade: pip install --upgrade biocommons-seqrepo, then use 'from biocommons.seqrepo import SeqRepo'
ValueError: no sequence found for 'NM_000558'
Accession not present in the local seqrepo data or incorrect version.
fix
Check if the accession exists, include version (e.g., 'NM_000558.4'), and ensure the data directory is up-to-date.
Upgrade
Version history
0.6.11latest on PyPI · released Mar 19, 2025
Audit
Dependencies
psycopg2-binaryoptionalRequired for PostgreSQL-based seqrepo instances (optional if using directory mode only)
biocommons-commonrequiredShared utilities used by seqrepo
typing_extensionsrequiredRequired for type annotations in Python <3.11
Agent activity
12 hits · last 30 days
node
10
OpenAI (training)
1
Resources
biocommons-seqrepo — pip install biocommons-seqrepo · libregistry