pub fn annotate_snv(
chrom: &str,
pos: u64,
ref_base: u8,
alt_base: u8,
transcript: &TranscriptModel,
locate_index: &LocateIndex,
fasta: &FastaReader,
) -> Result<ConsequenceResult, VarEffectError>Expand description
Annotate a single-nucleotide variant against one transcript.
ref_base and alt_base are on the plus strand (VCF convention).
For minus-strand transcripts, internal complementing is performed to
derive the coding-strand alleles.
§Arguments
chrom– UCSC-style chromosome name (e.g.,"chr17")pos– 0-based genomic positionref_base– VCF REF base (uppercase ASCII)alt_base– VCF ALT base (uppercase ASCII)transcript– Transcript model to annotate againstlocate_index– Precomputed locate index for the transcriptfasta– Reference FASTA reader for codon extraction and ref verification
§Returns
A ConsequenceResult with consequence terms, amino acids, codons,
and IMPACT. HGVS fields (hgvs_c, hgvs_p) are left as None.
§Errors
VarEffectError::RefMismatchif the VCF REF base does not match the reference FASTAVarEffectError::ChromNotFoundif the chromosome is not in the FASTA indexVarEffectError::CoordinateOutOfRangeif the position exceeds chromosome length