Skip to main content

annotate_snv

Function annotate_snv 

Source
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 position
  • ref_base – VCF REF base (uppercase ASCII)
  • alt_base – VCF ALT base (uppercase ASCII)
  • transcript – Transcript model to annotate against
  • locate_index – Precomputed locate index for the transcript
  • fasta – 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