rsomics-vcf-expr 0.1.0

bcftools-style VCF filter-expression parser and per-sample evaluator
Documentation
  • Coverage
  • 43.86%
    25 out of 57 items documented0 out of 13 items with examples
  • Size
  • Source code size: 46.16 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 911.89 kB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 2s Average build duration of successful builds.
  • all releases: 2s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • omics-rust/rsomics-world
    0 0 0
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • Bengerthelorf

rsomics-vcf-expr

A bcftools-style VCF filter-expression parser and per-sample evaluator — the shared expression engine behind rsomics-vcf-setgt (and other VCF tools that accept -i/-e/-t expressions). Layer-A library only (no binary).

Parses expressions over INFO/FORMAT fields and standard columns (e.g. QUAL>20 && FMT/DP>=10, GT="het", AF[0]<0.01) into an AST, then evaluates them per site and per sample.

Use

[dependencies]
rsomics-vcf-expr = "0.1"
use rsomics_vcf_expr::{parse, Expr};
let expr = parse("QUAL>20 && FMT/DP>=10")?;
// evaluate `expr` against a parsed VCF record / sample column

Origin

Independent Rust implementation of the bcftools filter-expression grammar, based on the public bcftools --include/--exclude expression documentation and the VCF spec, with black-box behaviour testing against bcftools view -i/-e. No GPL/MIT upstream source was used as reference.

License: MIT OR Apache-2.0. Upstream credit: bcftools (expression syntax).