+ * (Re-)computes peptide variants from dna variants, for any protein sequence
+ * to which the dna sequence has a mapping. Note that although duplicate
+ * features may get computed, they will not be added, since duplicate sequence
+ * features are ignored in Sequence.addSequenceFeature.
+ *
+ * @param dnaSeq
+ */
+ protected void computePeptideVariants(SequenceI dnaSeq)
+ {
+ DBRefEntry[] dbrefs = dnaSeq.getDBRefs();
+ if (dbrefs == null)
+ {
+ return;
+ }
+ for (DBRefEntry dbref : dbrefs)
+ {
+ Mapping mapping = dbref.getMap();
+ if (mapping == null || mapping.getTo() == null
+ || mapping.getMap().getFromRatio() != 3)
+ {
+ continue;
+ }
+ AlignmentUtils.computeProteinFeatures(dnaSeq, mapping.getTo(),
+ mapping.getMap());
+ }
+ }
+
+ /**