| Crates.io | check_build |
| lib.rs | check_build |
| version | 0.4.0 |
| created_at | 2025-02-27 23:06:54.736298+00 |
| updated_at | 2026-01-21 03:42:43.543062+00 |
| description | A tool to verify a VCF file against hg19 and hg38 references using a streaming, low-memory approach. |
| homepage | |
| repository | https://docs.rs/crate/check_build/latest |
| max_upload_size | |
| id | 1572261 |
| size | 104,805 |
A fast, memory-efficient tool to verify VCF files against hg19 and hg38 reference genomes. Also available as a library for general-purpose use beyond VCF.
What build is my file?
check_build --detect my_variants.vcf
# Output: Hg38 (100.0% match, high confidence)
Full verification:
check_build my_variants.vcf
cargo install check_build
Or from source:
git clone https://github.com/SauersML/check_build.git
cd check_build
cargo build --release
# Simple build detection
check_build --detect sample.vcf
# Full verification with summary
check_build sample.vcf
# Quiet mode (no progress bars)
check_build -q sample.vcf
# Summary only (no mismatch details)
check_build -s sample.vcf
# Single reference
check_build --hg38-only sample.vcf
# Custom reference paths
check_build --hg19-path /data/hg19.fa --hg38-path /data/hg38.fa sample.vcf
Add to Cargo.toml:
[dependencies]
check_build = { git = "https://github.com/SauersML/check_build" }
Simple usage:
use check_build::detect_build;
let result = detect_build("sample.vcf")?;
println!("{}", result); // "Hg38 (100.0% match, high confidence)"
Full control:
use check_build::{Verifier, Reference};
let result = Verifier::new("sample.vcf")
.quiet()
.verify_both()?;
println!("hg19: {:.1}% match", result.match_rate(Reference::Hg19));
println!("hg38: {:.1}% match", result.match_rate(Reference::Hg38));
// Detailed detection with edge case handling
match result.detect() {
BuildDetection::Detected { build, confidence, .. } => {
println!("Build: {:?} ({} confidence)", build, confidence);
}
BuildDetection::Ambiguous { reason, .. } => {
println!("Cannot determine: {}", reason);
}
BuildDetection::Unknown { reason, .. } => {
println!("Problem with file: {}", reason);
}
BuildDetection::NoData => {
println!("No valid variants found");
}
}
| Code | Meaning |
|---|---|
| 0 | Success (build detected or verification passed) |
| 1 | Error (file not found, download failed, etc.) |
| 2 | Ambiguous (matches both builds similarly) |
| 3 | Unknown (low match on both, possibly corrupt) |
| 4 | No data (VCF had no valid variants) |
MIT