import jalview.commands.EditCommand.Edit;
import jalview.commands.OrderCommand;
import jalview.datamodel.AlignedCodonFrame;
+import jalview.datamodel.AlignedCodonFrame.SequenceToSequenceMapping;
import jalview.datamodel.AlignmentI;
import jalview.datamodel.AlignmentOrder;
import jalview.datamodel.ColumnSelection;
{
int mappedStartResidue = 0;
int mappedEndResidue = 0;
-
for (AlignedCodonFrame acf : codonFrames)
{
- Mapping map = acf.getMappingBetween(seq, selected);
- if (map != null)
+ for (SequenceToSequenceMapping map: acf.getMappings())
+ {
+ if (map.covers(selected) && map.covers(seq))
{
/*
* Found a sequence mapping. Locate the start/end mapped residues.
List<AlignedCodonFrame> mapping = Arrays
.asList(new AlignedCodonFrame[]
{ acf });
+ // locate start
SearchResultsI sr = buildSearchResults(selected,
startResiduePos, mapping);
for (SearchResultMatchI m : sr.getResults())
mappedStartResidue = m.getStart();
mappedEndResidue = m.getEnd();
}
+ // locate end - allowing for adjustment of start range
sr = buildSearchResults(selected, endResiduePos, mapping);
for (SearchResultMatchI m : sr.getResults())
{
mappedGroup.addSequence(seq, false);
break;
}
- }
+ }}
}
}
mappedGroup.setStartRes(minStartCol < 0 ? 0 : minStartCol);