JAL-2110 generic rather than specific check for gap character
authorgmungoc <g.m.carstairs@dundee.ac.uk>
Wed, 6 Jul 2016 15:34:32 +0000 (16:34 +0100)
committergmungoc <g.m.carstairs@dundee.ac.uk>
Wed, 6 Jul 2016 15:34:32 +0000 (16:34 +0100)
src/jalview/datamodel/Mapping.java

index a0a050f..1c196be 100644 (file)
@@ -20,6 +20,7 @@
  */
 package jalview.datamodel;
 
+import jalview.util.Comparison;
 import jalview.util.MapList;
 
 import java.util.Iterator;
@@ -258,7 +259,8 @@ public class Mapping
       int truePos = sequencePos - (start - 1);
       while (alignedBases < truePos && alignedColumn < alignedSeq.length)
       {
-        if (alignedSeq[alignedColumn++] != gap)
+        char c = alignedSeq[alignedColumn++];
+        if (c != gap && !Comparison.isGap(c))
         {
           alignedBases++;
         }