Revert "Merge branch 'bug/JAL-3806_mappingCoversSequence' into releases/Release_2_11_...
[jalview.git] / src / jalview / datamodel / AlignedCodonFrame.java
index 6e83fbb..6faf7a6 100644 (file)
@@ -433,7 +433,8 @@ public class AlignedCodonFrame
 
   /**
    * Add search results for regions in other sequences that translate or are
-   * translated from a particular position in seq
+   * translated from a particular position in seq (which may be an aligned or
+   * dataset sequence)
    * 
    * @param seq
    * @param index
@@ -445,6 +446,10 @@ public class AlignedCodonFrame
           SearchResultsI results)
   {
     SequenceI ds = seq.getDatasetSequence();
+    if (ds == null)
+    {
+      ds = seq;
+    }
     for (SequenceToSequenceMapping ssm : mappings)
     {
       ssm.markMappedRegion(ds, index, results);
@@ -949,9 +954,9 @@ public class AlignedCodonFrame
   }
 
   /**
-   * Returns the first mapping found which is between the given sequence and
-   * another, is a triplet mapping (3:1 or 1:3), and covers the full extent of
-   * both sequences involved.
+   * Returns the first mapping found which is between the given dataset sequence
+   * and another, is a triplet mapping (3:1 or 1:3), and covers the full extent
+   * of both sequences involved
    * 
    * @param seq
    * @return