rust-ise 0.2.2

Fast Rust-native ISEScan-equivalent insertion-sequence (IS) scanner for bacterial (meta)genomes: rustygal ORFs + MMseqs2 profile search + native affine-SW terminal inverted repeats.
Documentation
// Generates a compile-time perfect-hash map (rep -> pident threshold) from
// data/rep_thresholds.tsv (GTDB-calibrated). Only "gated" profiles (thr>0) are listed;
// a rep absent from the map means no gate (threshold 0 = accept) at lookup time.
use std::{env, fs, io::Write, path::Path};

fn main() {
    println!("cargo:rerun-if-changed=data/rep_thresholds.tsv");
    let data = fs::read_to_string("data/rep_thresholds.tsv")
        .expect("data/rep_thresholds.tsv not found");
    let mut builder = phf_codegen::Map::new();
    for line in data.lines() {
        let mut it = line.split('\t');
        match (it.next(), it.next()) {
            (Some(rep), Some(thr)) if !rep.is_empty() => {
                let v: f32 = thr.trim().parse().expect("bad threshold value");
                builder.entry(rep, &format!("{v}f32"));
            }
            _ => {}
        }
    }
    let out = Path::new(&env::var("OUT_DIR").unwrap()).join("rep_thresholds.rs");
    let mut w = fs::File::create(&out).unwrap();
    writeln!(
        w,
        "/// rep -> min pident to accept a hit to that profile (GTDB-calibrated). Absent = 0 (accept).\n\
         static REP_THRESHOLDS: phf::Map<&'static str, f32> = {};",
        builder.build()
    )
    .unwrap();
}