Extra bases fetched upstream of the start codon when building pnca/pnca_h37rv.fasta
(must match upstream_flank in res/sequences/sequences.tomlβs pncA [[genome]] entry).
HGVS c.-N positions are resolved against this flank.
Collect 3 consecutive non-deleted query bases at reference positions ref_pos..ref_pos+3.
Returns None if the position is outside the aligned region or any of the 3 ref positions
has a deletion in the query (consistent with the existing policy of skipping frameshifts).
Database is REF_PNCA: the pncA CDS plus a 50bp upstream promoter flank for each
M. tuberculosis complex member with a distinct sequence (H37Rv Rv2043c, bovis AF2122/97,
canettii β see res/sequences/sequences.toml for the rest, including the bovis BCG
Pasteur/africanum/mungi/orygis references that were tried and dropped as exact duplicates
of one of these three), fetched from NCBI at build time (via fetch_sequences_from_toml()
in build.rs).
Returns Some(false) when any covered siteβs allele matches a catalogued resistance-
conferring alt at confidence rank < 2 (e.g. βAssoc w Rβ). Returns Some(true) only when
every diagnostic site is covered and every observed allele is wildtype. Returns None
whenever any site went uncovered, an uncatalogued variant was found, weak/uncertain
resistance evidence was seen, or no diagnostic site was reached at all.
0-based index into REF_PNCA of a signed HGVS coding-sequence position. There is no
c.0 β c.-1 sits immediately before c.1 (the A of the start codon).
Parses tbprofiler/mutations.csv, keeping only pncA rows whose mutation is a simple
nucleotide substitution (c.POS[wt]>[alt], promoter or coding) or a single-codon amino
acid substitution / nonsense call (p.WtNNNAlt / p.WtNNN*).
Maps a 1-based codon number to (wt_aa, alts) where alts maps each resistance alt amino
acid (3-letter code, or "*" for nonsense) to (drugs, WHO confidence label).
Maps a signed HGVS coding-sequence position (negative = promoter, e.g. c.-11) to
(wt_base, alts) where alts maps each resistance alt to (drugs, WHO confidence label).