BioAssert is a bioinformatics assertion and validation tool written in Rust. It provides both a reusable library (lib.rs) and a CLI binary (main.rs).
- Assert
- BAM
- Read Counts ✅
- Sorting ☑️
- Headers ☑️
- Read Lengths ☑️
- FASTA
- FASTQ
- VCF
- BAM
- Built on the noodles bioinformatics library
cargo install bioassert- Successful assertions print
OKto stdout and exit with a zero status code.
bioassert bam example.bam read_count eq 53
OK
bioassert bam example.bam read_count gt 10
OK
bioassert bam example.bam read_count lt 200
OK- Failed assertions print an error message to stderr and exit with a non-zero status code.
bioassert bam example.bam read_count eq 1
Error: Assertion failed. Expected: read count == 1, actual: 53Add to your Cargo.toml:
[dependencies]
bioassert = "0.1"use bioassert;# Build
cargo build
# Run tests
cargo test
# Lint
cargo clippy --all-targets --all-features -- -D warningsThis project uses a manual bump PR workflow. Versioning lives in Cargo.toml
and is enforced against the git tag in CD.
- Create a release PR:
- Bump
versioninCargo.toml(semver; pre-1.0 uses0.MINOR.PATCH). - Update
CHANGELOG.md(moveUnreleaseditems into a new version section). - Run
cargo buildsoCargo.lockis updated. - Commit, e.g.
chore: release v0.1.2.
- Bump
- Merge the PR to
main. - Create a GitHub Release with tag
vX.Y.Z(matchingCargo.toml). - CD (
.github/workflows/cd.yml) will:- Verify the tag matches
Cargo.toml. - Run tests.
cargo publish --locked --dry-run, then publish to crates.io.
- Verify the tag matches
Published versions on crates.io are immutable. Always bump before releasing.