Skip to content

PeterKneale/bioassert

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

BioAssert

CI Crates.io

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).

Features

  • Assert
    • BAM
      • Read Counts ✅
      • Sorting ☑️
      • Headers ☑️
      • Read Lengths ☑️
    • FASTA
    • FASTQ
    • VCF
  • Built on the noodles bioinformatics library

Installation

cargo install bioassert

CLI Usage

  • Successful assertions print OK to 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: 53

Library Usage

Add to your Cargo.toml:

[dependencies]
bioassert = "0.1"
use bioassert;

Development

# Build
cargo build

# Run tests
cargo test

# Lint
cargo clippy --all-targets --all-features -- -D warnings

Releasing

This project uses a manual bump PR workflow. Versioning lives in Cargo.toml and is enforced against the git tag in CD.

  1. Create a release PR:
    • Bump version in Cargo.toml (semver; pre-1.0 uses 0.MINOR.PATCH).
    • Update CHANGELOG.md (move Unreleased items into a new version section).
    • Run cargo build so Cargo.lock is updated.
    • Commit, e.g. chore: release v0.1.2.
  2. Merge the PR to main.
  3. Create a GitHub Release with tag vX.Y.Z (matching Cargo.toml).
  4. CD (.github/workflows/cd.yml) will:
    • Verify the tag matches Cargo.toml.
    • Run tests.
    • cargo publish --locked --dry-run, then publish to crates.io.

Published versions on crates.io are immutable. Always bump before releasing.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages