{"id":42889118,"url":"https://github.com/tmaklin/ntcomp","last_synced_at":"2026-01-30T14:55:20.624Z","repository":{"id":303826741,"uuid":"1015551453","full_name":"tmaklin/ntcomp","owner":"tmaklin","description":"Sequencing data compression using SBWT and k-bounded matching statistics.","archived":false,"fork":false,"pushed_at":"2025-07-31T15:08:46.000Z","size":109,"stargazers_count":0,"open_issues_count":8,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-07-31T15:16:11.226Z","etag":null,"topics":["bioinformatics","compression","decompression","genomics","rust","sbwt","sequencing-data"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tmaklin.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE-APACHE","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,"zenodo":null}},"created_at":"2025-07-07T17:10:51.000Z","updated_at":"2025-07-31T15:08:50.000Z","dependencies_parsed_at":"2025-07-09T17:03:18.652Z","dependency_job_id":null,"html_url":"https://github.com/tmaklin/ntcomp","commit_stats":null,"previous_names":["tmaklin/ntcomp"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/tmaklin/ntcomp","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tmaklin%2Fntcomp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tmaklin%2Fntcomp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tmaklin%2Fntcomp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tmaklin%2Fntcomp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tmaklin","download_url":"https://codeload.github.com/tmaklin/ntcomp/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tmaklin%2Fntcomp/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28914895,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-30T12:13:43.263Z","status":"ssl_error","status_checked_at":"2026-01-30T12:13:22.389Z","response_time":66,"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","compression","decompression","genomics","rust","sbwt","sequencing-data"],"created_at":"2026-01-30T14:55:20.562Z","updated_at":"2026-01-30T14:55:20.614Z","avatar_url":"https://github.com/tmaklin.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ntcomp\n(Proof of concept) Reference-based microbial sequencing data compression using [SBWT](https://docs.rs/sbwt) and [_k_-bounded matching statistics](https://www.biorxiv.org/content/10.1101/2024.02.19.580943v1).\n\n## Installation\n``` sh\ngit clone https://github.com/tmaklin/ntcomp\ncd ntcomp\ncargo build --release\n```\nThe built binary is located at `target/release/ntcomp`.\n\n## Usage\n### Setup example data\n``` sh\nwget https://a3s.fi/maklinto-2006181-pub/ntcomp-test.tar\ntar -xf ntcomp-test.tar\n```\n\n### Preparing an index\nBuild from a reference sequence\n``` sh\nntcomp build -o index -k91 test/GCA_964037205.1_30348_1_60_genomic.fna.gz\n```\n\nLarger values of `-k` produce better compression ratios at the cost of larger .lcs file size.\n\n### Encoding fastX data\nQuery fastX data against an index and write the encoding\n``` sh\nntcomp encode --index index test/ERR10498075.fastq.gz \u003e encoded.dat\n```\n\nEncoding data requires both the .sbwt and .lcs files.\n\nThis removes quality scores.\n\n### Decoding encoded fastX data\nRetrieve the encoded sequences from an index\n\n``` sh\nntcomp decode --index index encoded.dat \u003e decoded.fasta\n```\n\nIn theory decoding requires only the .sbwt file but the tool will not run without the .lcs file present.\n\nDecoding will also work with a rebuilt SBWT, as the construction algorithm is deterministic.\n\n### Verify\nRequires installing [seqtk](https://github.com/lh3/seqtk)\n``` sh\nseqtk seq -A test/ERR10498075.fastq.gz | sed 's/ERR[0-9]*[.]\\([0-9]*\\).*$/seq.\\1/g' \u003e expected.fasta\ndiff -s decoded.fasta expected.fasta\n```\n\n## About\nWorks by finding the longest common suffix matches between the _k_-mers in an input nucleotide sequence and an SBWT index and encoding the input as pairs of (`longest common suffix length` and `suffix sequence location in the SBWT`).\n\nIf the index is a close match to the sequencing reads, such as an assembly from the same reads, and the reads are reasonably accurate, many of the _k_-mers in the reads are redundant and looking them up from the index uses less storage compared to storing their entire sequence.\n\n## License\nntcomp is dual-licensed under the [MIT](LICENSE-MIT) and [Apache 2.0](LICENSE-APACHE) licenses.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftmaklin%2Fntcomp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftmaklin%2Fntcomp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftmaklin%2Fntcomp/lists"}