Skip to main content

Module eval

Module eval 

Source
Expand description

Evaluator: runs a parsed Expr against a VCF record line (text representation).

The evaluator operates on raw VCF tab-split text — no noodles dependency — keeping the crate in Quadrant ① (pure Rust, no FFI).

§Evaluation model

A VCF data line has CHROM/POS/ID/REF/ALT/QUAL/FILTER/INFO/FORMAT/sample… columns. Fields that are sample-level (FMT/) are evaluated per-sample, yielding one boolean per sample. Fields that are site-level (QUAL, INFO/) produce one boolean that propagates identically to all samples.

SampleResult reports per-sample pass/fail. For site-level expressions every sample gets the same value. The caller (setgt -t q) iterates SampleResult to decide which samples to rewrite.

Structs§

EvalContext
Convenience wrapper: evaluate expr against a raw VCF line and return per-sample booleans. Equivalent to eval_expr but returns EvalError wrapped in a Box<dyn Error>.
SampleResult
Per-sample evaluation result from eval_expr.

Enums§

EvalError

Functions§

eval_expr
Evaluate expr against a raw VCF data line, returning per-sample pass/fail.