Validated interval geometry and region-file coordinates for rsomics products.
Intervals use zero-based half-open coordinates. Zero-length intervals are valid but overlap nothing. Inverted intervals are rejected.
Interval<C> is generic over the chromosome identifier. Streaming parsers can
borrow a name as Interval<&str> without allocating, while retained records
can use the default Interval<String>. Its fields are private so every value
preserves the coordinate invariant.
read_region_file normalizes BED, VCF, and generic tabular inputs for
rsomics-call and rsomics-cnv. It accepts gzip and BGZF streams, reports the
physical line of invalid records, and represents a target with no coordinates
as a whole reference sequence.
The public surface is intentionally limited to coordinate normalization and basic geometry. Interval collections, indexed format access, overlap policy, output formatting, and format-specific strand semantics remain inside their consuming products.
use rsomics_intervals::Interval;
let feature = Interval::new("chr1", 10, 20)?;
let query = Interval::new("chr1", 15, 25)?;
assert!(feature.overlaps(&query));License: MIT OR Apache-2.0.