- allele = allele.trim().toUpperCase();
- if (allele.length() > 1)
- {
- continue; // multi-locus variant
- }
- char[] variantCodon = new char[3];
- variantCodon[0] = baseCodon[0];
- variantCodon[1] = baseCodon[1];
- variantCodon[2] = baseCodon[2];
-
- /*
- * poke variant base into canonical codon
- */
- int i = cdsPos == codonPos[0] ? 0 : (cdsPos == codonPos[1] ? 1 : 2);
- variantCodon[i] = allele.toUpperCase().charAt(0);
- String codon = new String(variantCodon);
- String peptide = ResidueProperties.codonTranslate(codon);
- if (fromResidue != peptide.charAt(0))
+ String to3 = ResidueProperties.STOP.equals(peptide) ? "STOP"
+ : StringUtils.toSentenceCase(
+ ResidueProperties.aa2Triplet.get(peptide));
+ String var = "p." + from3 + fromPosition + to3;
+ if (!variantPeptides.contains(peptide)) // duplicate consequence