rustyhmmer 0.1.1

Pure-Rust HMMER3 hmmsearch with byte-identical --tblout output
Documentation
// Validate the HmmAnnotator API against the byte-parity binary.
//   cargo run --release --example annotate -- <db.hmm> <proteins.fa>
use rustyhmmer::api::{Cutoff, HmmAnnotator};
use rustyhmmer::seqio;

fn main() {
    let mut a = std::env::args().skip(1);
    let hmm = a.next().expect("usage: annotate <db.hmm> <proteins.fa>");
    let fa = a.next().expect("need proteins.fa");
    let cutoff = match a.next().as_deref() {
        Some("ga") => Cutoff::GatheringGa,
        Some("tc") => Cutoff::TrustedTc,
        _ => Cutoff::Evalue(10.0),
    };

    let seqs = seqio::read_fasta(&fa).expect("read fasta");
    let ann = HmmAnnotator::from_hmm_file(&hmm).expect("load hmm").with_cutoff(cutoff);
    let hits = ann.search(&seqs);
    for h in &hits {
        println!(
            "{}\t{}\t{}\tscore={:.1}\tE={:.2e}\tndom={}\tenv={}..{}",
            h.query_name, h.query_acc, h.target_name,
            h.seq_score, h.seq_evalue, h.n_domains, h.env_from, h.env_to
        );
    }
    eprintln!("{} hits", hits.len());
}