A server implementation of the htsget protocol for bioinformatics, written in Rust. It lets clients fetch specific regions of large genomics files over HTTP, reads (BAM and CRAM) and variants (VCF and BCF) without having to download the whole file. This directly supports our requirement to make large controlled datasets available to researchers rather than copying terabytes into every research space.
It works through the htsget “ticket” mechanism. A client asks for a region of a file, and the
server responds with an array of URL tickets that point at byte ranges of the underlying data.
The client fetches those tickets and concatenates them to reconstruct the data. htsget-rs aims to
return byte ranges that are as small as possible.
The tool is flexible about how and where it runs:
- It can run serverless on AWS Lambda, which is the deployment that underpins our AWS-native data sharing across accounts and organisations.
- Storage is interchangeable, data can come from the local filesystem, from AWS S3 (returning pre-signed URLs as tickets), or from a remote HTTP server.
- It is configured with environment variables or a TOML config file, where
locationsmap request ids ontofile://,s3://orhttps://sources, with optional prefixes for serving multiple datasets. - Because it sits between the caller and the data, it can enforce its own fine-grained, role-aware authorisation, slicing data to the genomic regions a caller’s consent permits rather than being limited to AWS IAM.
htsget-rs is the cloud-native access layer in front of the S3 caches. Deployed serverlessly, it lets
researchers and downstream tools pull only the regions of data they need on demand, such as a single gene or
chromosome, instead of transferring the whole file.