- /*
- * VCF data may already contain the protein consequence
- */
- String hgvsp = sf.getValueAsString("CSQ", "HGVSp");
- if (hgvsp != null)
+ // not handling multi-locus variant features
+ return "";
+ }
+ if (cdsPos != codonPos[0] && cdsPos != codonPos[1]
+ && cdsPos != codonPos[2])
+ {
+ // e.g. feature on intron within spliced codon!
+ return "";
+ }
+
+ String alls = (String) sf.getValue(Gff3Helper.ALLELES);
+ if (alls == null)
+ {
+ return "";
+ }
+
+ String from3 = StringUtils.toSentenceCase(
+ ResidueProperties.aa2Triplet.get(String.valueOf(toResidue)));
+
+ /*
+ * make a peptide variant for each SNP allele
+ * e.g. C,G,T gives variants G and T for base C
+ */
+ Set<String> variantPeptides = new HashSet<>();
+ String[] alleles = alls.toUpperCase().split(",");
+ StringBuilder vars = new StringBuilder();
+
+ for (String allele : alleles)
+ {
+ allele = allele.trim().toUpperCase();
+ if (allele.length() > 1 || "-".equals(allele))