BAMWhat
A fast Rust CLI that turns an unfamiliar BAM, SAM, or CRAM file into an evidence-backed identity card.
It extracts header metadata, inventories optional tags, measures alignment characteristics, and infers the likely assay, sequencing technology, reference build, and aligner. The default fast path reads only 100,000 records and uses bounded memory.
Build
Install a current stable Rust toolchain from https://rustup.rs, then:
cargo build --release
./target/release/bamwhat --help
HTSlib compilation requires a C compiler and common compression development libraries. On Debian or Ubuntu:
sudo apt install build-essential pkg-config libssl-dev zlib1g-dev \
libbz2-dev liblzma-dev libcurl4-openssl-dev
Use
bamwhat sample.bam
bamwhat sample.bam --json
bamwhat sample.bam --sample 1000000 --threads 4
bamwhat sample.bam --full --json > passport.json
Install the native command from PyPI and run it normally:
pip install bamwhat
bamwhat sample.bam
The wheel contains the compiled Rust executable; invoking bamwhat does not
start a Python interpreter. For a local packaging test, run pip install ..
The JSON schema remains versioned separately from the application and is
currently 1.0.
Performance
- Native HTSlib BAM/SAM/CRAM decoding through
rust-htslib - Optional multithreaded BGZF decompression with
--threads - Bounded-memory streaming
- Early termination after the configured sample
- Release profile uses thin LTO, one codegen unit, and stripped symbols
The current fast path samples the beginning of the alignment stream. A future release can add indexed stratified sampling without changing the report schema.
Test
cargo test
cargo clippy --all-targets -- -D warnings
cargo fmt --check
License
MIT
Metadata
Release files for bamwhat 0.2.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| bamwhat-0.2.2.tar.gz | 17.8 kB | Details |
Built distributions (wheels)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| bamwhat-0.2.2-py3-none-manylinux_2_38_x86_64.whl | Python 3 | none | Linux glibc 2.38+ x86-64 | Details |
| bamwhat-0.2.2-py3-none-macosx_11_0_arm64.whl | Python 3 | none | macOS 11.0+ ARM64 | Details |
Total release size: 6.7 MB
Release files / bamwhat-0.2.2.tar.gz
| Download URL | bamwhat-0.2.2.tar.gz |
|---|---|
| Size | 17.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
6e37dc356a24169bbf8b649dd463d49b29abfc1a3e935f588c143a1973ae8535
|
|
BLAKE2b-256 checksum How to use checksums |
5f02ae9dd0e62e93a457fafb6d7d6b0488f1d08cf002b31894afab7fd2ce54b5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jul 24, 2026.
Transparency logRelease files / bamwhat-0.2.2-py3-none-manylinux_2_38_x86_64.whl
| Download URL | bamwhat-0.2.2-py3-none-manylinux_2_38_x86_64.whl |
|---|---|
| Size | 3.4 MB |
| Tags | Linux glibc 2.38+ x86-64 Python 3 |
|
SHA-256 checksum How to use checksums |
0a30516d4efe4852766dfabecc3531f66fdc77b7f99de436cbff0a65a9f99344
|
|
BLAKE2b-256 checksum How to use checksums |
67e4061e4b612745a13a497a9f28992ef11a11a801ad89825c5304039ba66766
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jul 24, 2026.
Transparency logRelease files / bamwhat-0.2.2-py3-none-macosx_11_0_arm64.whl
| Download URL | bamwhat-0.2.2-py3-none-macosx_11_0_arm64.whl |
|---|---|
| Size | 3.3 MB |
| Tags | Python 3 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
1ef51e7150f7d14f1ce8044ae31e0899c56cfece10026b37798f7aaf52b596b1
|
|
BLAKE2b-256 checksum How to use checksums |
fa95185fa9168d456cd8cb82321e42abc544aec6d4edc529250dae3214b145de
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jul 24, 2026.
Transparency log