{"id":23363,"library":"biocommons-seqrepo","title":"biocommons.seqrepo","description":"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.","status":"active","version":"0.6.11","language":"python","source_language":"en","source_url":"https://github.com/biocommons/biocommons.seqrepo","tags":["bioinformatics","sequences","genomics","seqrepo","biocommons"],"install":[{"cmd":"pip install biocommons-seqrepo","lang":"bash","label":"PyPI install"}],"dependencies":[{"reason":"Required for PostgreSQL-based seqrepo instances (optional if using directory mode only)","package":"psycopg2-binary","optional":true},{"reason":"Shared utilities used by seqrepo","package":"biocommons-common","optional":false},{"reason":"Required for type annotations in Python <3.11","package":"typing_extensions","optional":false}],"imports":[{"note":"top-level package is biocommons.seqrepo, not seqrepo","wrong":"from seqrepo import SeqRepo","symbol":"SeqRepo","correct":"from biocommons.seqrepo import SeqRepo"},{"note":"hyphenated package name maps to biocommons.seqrepo, not underscore","wrong":"from biocommons_seqrepo import SeqRepo","symbol":"SeqRepo","correct":"from biocommons.seqrepo import SeqRepo"}],"quickstart":{"code":"from biocommons.seqrepo import SeqRepo\n\n# Use a local directory (or set SEQREPO_ROOT_DIR env var)\nsr = SeqRepo(root_dir=\"/path/to/seqrepo\", writeable=True)\n\n# Fetch a sequence by NCBI accession (e.g., NM_000558.4)\nseq = sr.fetch(\"NM_000558.4\")  # returns a SeqRecord\nprint(seq.id, len(seq.seq))\n","lang":"python","description":"Basic usage: create a SeqRepo instance pointing to a local seqrepo data directory and fetch sequences by accession."},"warnings":[{"fix":"Upgrade to Python 3.10 or later.","message":"Python 3.9 and older are no longer supported since v0.6.11. Requires Python >=3.10.","severity":"breaking","affected_versions":">=0.6.11"},{"fix":"Use 'seqrepo --help' to see CLI commands; no more 'python -m seqrepo'.","message":"The 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).","severity":"deprecated","affected_versions":">=0.6.8"},{"fix":"Explicitly set writeable=True when creating a SeqRepo for writing.","message":"SeqRepo instances are read-only by default. To write or update, you must pass writeable=True to the constructor.","severity":"gotcha","affected_versions":"all"},{"fix":"Ensure correct case for accessions.","message":"Accession lookup is case-sensitive. 'NM_000558.4' works, 'nm_000558.4' does not.","severity":"gotcha","affected_versions":"all"},{"fix":"Set SEQREPO_ROOT_DIR or use the root_dir parameter with the correct path.","message":"When 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.","severity":"gotcha","affected_versions":"all"}],"env_vars":null,"last_verified":"2026-05-01T00:00:00.000Z","next_check":"2026-07-30T00:00:00.000Z","problems":[{"fix":"pip install biocommons-seqrepo","cause":"Package not installed or installed under a different name.","error":"ModuleNotFoundError: No module named 'biocommons.seqrepo'"},{"fix":"Upgrade: pip install --upgrade biocommons-seqrepo, then use 'from biocommons.seqrepo import SeqRepo'","cause":"Outdated version (<0.6.0) or incorrect import path.","error":"AttributeError: module 'biocommons.seqrepo' has no attribute 'SeqRepo'"},{"fix":"Check if the accession exists, include version (e.g., 'NM_000558.4'), and ensure the data directory is up-to-date.","cause":"Accession not present in the local seqrepo data or incorrect version.","error":"ValueError: no sequence found for 'NM_000558'"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}