a1c329068ad18aa4093972b501e6324f8bcdb398 angie Fri Sep 16 17:19:30 2016 -0700 Parse HGVS position ranges and coding terms' UTR and intron coordinates. When the chromAlias table is present, this also now supports NC_*:g. terms. The sequence change part is no longer parsed -- it's not necessary for mapping to genomic ranges, although it will be necessary in order for hgVai to take HGVS input. This does not yet support ranges-of-ranges but neither does Mutalyzer. This also doesn't support uncertain positions ('?'). Like complex sequence changes, those can wait until we have a sophisticated parser. We also support some new not-quite-HGVS forms: geneSymbol and protein pos only, or geneSymbol and c.<valid position range>. refs #15071 diff --git src/lib/dnautil.c src/lib/dnautil.c index 6c14a58..8687e91 100644 --- src/lib/dnautil.c +++ src/lib/dnautil.c @@ -1171,46 +1171,30 @@ /* Initialize stuff herein. */ { static boolean opened = FALSE; if (!opened) { checkSizeTypes(); initNtVal(); initAaVal(); initNtChars(); initNtMixedCaseChars(); initNtCompTable(); opened = TRUE; } } -boolean aaToArbitraryCodon(char aa, char *dest) -/* Reverse-translate aa back into one of its codons, return TRUE if successful. - * Writes 3 characters at the start of dest; does not null-terminate the codon string. */ -{ -int ix; -for (ix = 0; ix < ArraySize(codonTable); ix++) - { - if (toupper(aa) == codonTable[ix].protCode) - { - strncpy(dest, codonTable[ix].codon, 3); - return TRUE; - } - } -return FALSE; -} - char aaAbbrToLetter(char *abbr) /* Convert an AA abbreviation such as "Ala", "Asp" etc., to its single letter code * such as "A", "D" etc. Return the null char '\0' if abbr is not found. */ { // Lowercase for comparison. char abbrLC[4]; safencpy(abbrLC, sizeof(abbrLC), abbr, 3); toLowerN(abbrLC, 3); int ix; for (ix = 0; ix < ArraySize(aminoAcidTable); ix++) { if (sameStringN(abbrLC, aminoAcidTable[ix].abbreviation, 3)) return aminoAcidTable[ix].letter; } return '\0';