A Rust implementation of the GA4GH refget API, covering both the Sequences v2.0.0 and Sequence Collections v1.0.0 specifications.
Visit us at Fulcrum Genomics to learn more about how we can power your Bioinformatics with refget-rs and beyond.
refget-rs provides:
refget-digest— SHA-512/24 (sha512t24u) and RFC 8785 JSON Canonicalization (JCS) computationrefget-model— Domain types for sequences and sequence collections, including the comparison algorithmrefget-store— Storage traits with in-memory and indexed-FASTA backendsrefget-server— Composable Axum router library for all refget endpointsrefget-server-bin— Standalone server binary that serves FASTA files via the refget APIrefget-tools— CLI tool for computing refget digests from FASTA files
Clone the repository:
git clone https://github.com/fg-labs/refget-rsBuild the release binaries:
cd refget-rs
cargo build --releaseThe two binaries will be at target/release/refget-server and target/release/refget-tools.
Start a refget server that serves one or more indexed FASTA files:
refget-server --fasta ref.fa --port 8080You can pass multiple files or a directory:
refget-server --fasta /path/to/fastas/ --port 8080Note: Each FASTA file must have a companion .fai index (e.g. ref.fa.fai).
| Endpoint | Description |
|---|---|
GET /sequence/service-info |
Service info (algorithms, formats) |
GET /sequence/{digest} |
Retrieve sequence bases (supports Range header, start/end query params) |
GET /sequence/{digest}/metadata |
Sequence metadata (MD5, sha512t24u, length, aliases) |
| Endpoint | Description |
|---|---|
GET /service-info |
Service info with collection schema |
GET /collection/{digest}?level=0|1|2 |
Collection at specified level (default: 2) |
GET /comparison/{digest1}/{digest2} |
Compare two collections |
POST /comparison/{digest1} |
Compare a collection against POSTed Level 2 JSON |
GET /list/collection |
Paginated collection listing with attribute filters |
GET /attribute/collection/{attr}/{digest} |
Single attribute array by digest |
Compute per-sequence digests from a FASTA file:
refget-tools digest-fasta ref.faOutput (TSV): name, length, md5, sha512t24u
Compute sequence collection digests:
refget-tools digest-collection ref.fa- GA4GH refget specification
- Sequence Collections specification
- Issues: Report a bug or request a feature
- Pull requests: Submit a patch or new feature
- Contributors guide
- License: Released under the MIT license
Development of refget-rs is supported by Fulcrum Genomics.
This software is under active development. While we make a best effort to test this software and to fix issues as they are reported, this software is provided as-is without any warranty (see the license for details). Please submit an issue, and better yet a pull request as well, if you discover a bug or identify a missing feature. Please contact Fulcrum Genomics if you are considering using this software or are interested in sponsoring its development.