JAL-3725 restrict mapped virtual feature location to mapped region
[jalview.git] / src / jalview / datamodel / SequenceFeature.java
index 01574e1..bbf1b45 100755 (executable)
@@ -612,10 +612,9 @@ public class SequenceFeature implements FeatureLocationI
     String consequence = "";
     if (mf != null)
     {
-      int[] beginRange = mf.getMappedPositions(begin, begin);
-      int[] endRange = mf.getMappedPositions(end, end);
-      int from = beginRange[0];
-      int to = endRange[endRange.length - 1];
+      int[] localRange = mf.getMappedPositions(begin, end);
+      int from = localRange[0];
+      int to = localRange[localRange.length - 1];
       String s = mf.isFromCds() ? "Peptide Location" : "Coding location";
       sb.append(String.format(ROW_DATA, s, seqName, from == to ? from
               : from + (isContactFeature() ? ":" : "-") + to));
@@ -639,7 +638,7 @@ public class SequenceFeature implements FeatureLocationI
     if (!consequence.isEmpty())
     {
       sb.append(String.format(ROW_DATA, "Consequence",
-              "<i>Imputed by Jalview</i>", consequence));
+              "<i>Translated by Jalview</i>", consequence));
     }
 
     if (otherDetails != null)