{"id":17174840,"url":"https://github.com/corneliusroemer/fasta_zstd_sqlite","last_synced_at":"2026-05-19T09:06:13.281Z","repository":{"id":107287299,"uuid":"410376916","full_name":"corneliusroemer/fasta_zstd_sqlite","owner":"corneliusroemer","description":"Efficiently store FASTA sequences in sqlite compressed with sidecar zstd dictionary","archived":false,"fork":false,"pushed_at":"2021-10-04T14:32:19.000Z","size":543,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2026-04-26T17:34:06.422Z","etag":null,"topics":["bioinformatics","fasta","genomic-epidemiology","sqlite","virus-bioinformatics","zstd","zstd-dictionary"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/corneliusroemer.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-09-25T20:37:23.000Z","updated_at":"2024-08-31T21:01:24.000Z","dependencies_parsed_at":null,"dependency_job_id":"617d0b85-1945-4ad2-8bc8-3c13d404189e","html_url":"https://github.com/corneliusroemer/fasta_zstd_sqlite","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/corneliusroemer/fasta_zstd_sqlite","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/corneliusroemer%2Ffasta_zstd_sqlite","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/corneliusroemer%2Ffasta_zstd_sqlite/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/corneliusroemer%2Ffasta_zstd_sqlite/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/corneliusroemer%2Ffasta_zstd_sqlite/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/corneliusroemer","download_url":"https://codeload.github.com/corneliusroemer/fasta_zstd_sqlite/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/corneliusroemer%2Ffasta_zstd_sqlite/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33209457,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-19T07:54:09.561Z","status":"ssl_error","status_checked_at":"2026-05-19T07:54:08.508Z","response_time":58,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bioinformatics","fasta","genomic-epidemiology","sqlite","virus-bioinformatics","zstd","zstd-dictionary"],"created_at":"2024-10-14T23:55:01.158Z","updated_at":"2026-05-19T09:06:13.241Z","avatar_url":"https://github.com/corneliusroemer.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"CLI tool to store and retrieve individual dictionary zstd compressed FASTA records in an sqlite database\n\n## Features\n\n- Fast retrieval of FASTA records from database (~GB/s)\n- High compression ratio (100 GB -\u003e 1 GB) for similar sequences (like Sars-CoV-2 genomes)\n- Fast compression (~GB/s)\n- Convenient CLI user interface (no need to use Python)\n- User can choose between explicit file names or stdin/stdout\n- Batteries included:\n  - zstd dictionary is auto-generated from first fasta record\n  - zstd dictionary is auto-included in sqlite database, read automagically\n- sqlite database can be read by external tools\n- Records can be queried passing strain names via stdin or strains.txt file\n\n## Roadmap\n\n- Add support to store non-Fasta lines, e.g. metadata rows\n- Extend querying capabilities beyond strain names:\n  - by metadata\n  - by mutations\n- Support random sampling\n- Store hashes of uncompressed records to allow fast checking which records have changed (save time for downstreaming processing if records are unchanged, e.g. in Sars-CoV-2 pipelines\n- Make conda installable\n- Add tests\n\n## Installation\n\n1. Clone the repository:\n```bash\ngit clone https://github.com/corneliusroemer/fasta_zstd_sqlite.git\ncd fasta_zstd_sqlite\n```\n2. Install using pip\n```python\npython3 -m venv env\nsource env/bin/activate\npython3 -m pip install --editable .\n```\n\n## Usage\n\nCompressing fasta records line by line in sqlite db:\n```\nxzcat in.fasta.xz | fzs insert --db-path in.fasta.db\nfzs insert --fasta-path in.fasta --db-path in.fasta.db\nhead in.fasta | fzs insert --db-path in.fasta.db\n```\n\nQuerying records from sqlite db:\n```\nfzs query --db-path in.fasta.db --strains-path strains.txt  --fasta-path out.fasta\necho Wuhan-Hu-1 | fzs query --strains-path - --db-path in.fasta.db | less\n```\n\nUncompressing all records back to fasta:\n```\nfzs query --db-path in.fasta.db --fasta-path out.fasta\n```\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcorneliusroemer%2Ffasta_zstd_sqlite","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcorneliusroemer%2Ffasta_zstd_sqlite","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcorneliusroemer%2Ffasta_zstd_sqlite/lists"}