import jalview.api.FeatureColourI;
import jalview.api.FeaturesDisplayedI;
import jalview.datamodel.AlignedCodonFrame;
+import jalview.datamodel.AlignedCodonFrame.SequenceToSequenceMapping;
import jalview.datamodel.AlignmentI;
import jalview.datamodel.MappedFeatures;
-import jalview.datamodel.Mapping;
import jalview.datamodel.SearchResultMatchI;
import jalview.datamodel.SearchResults;
import jalview.datamodel.SearchResultsI;
* todo: direct lookup of CDS for peptide and vice-versa; for now,
* have to search through an unordered list of mappings for a candidate
*/
- Mapping mapping = null;
+ SequenceToSequenceMapping mapping = null;
SequenceI mapFrom = null;
for (AlignedCodonFrame acf : mappings)
{
- mapping = acf.getMappingForSequence(sequence);
- if (mapping == null || !mapping.getMap().isTripletMap())
+ mapping = acf.getCoveringCodonMapping(ds);
+ if (mapping == null)
{
- continue; // we are only looking for 3:1 or 1:3 mappings
+ continue;
}
SearchResultsI sr = new SearchResults();
- acf.markMappedRegion(ds, pos, sr);
+ mapping.markMappedRegion(ds, pos, sr);
for (SearchResultMatchI match : sr.getResults())
{
int fromRes = match.getStart();
}
}
- return new MappedFeatures(mapping, mapFrom, pos, residue, result);
+ return new MappedFeatures(mapping.getMapping(), mapFrom, pos, residue, result);
}
@Override