JAL-2335 choose appropriate alphabet for filtering nonstandard symbols
authorJim Procter <jprocter@issues.jalview.org>
Mon, 14 Aug 2017 13:17:35 +0000 (14:17 +0100)
committerJim Procter <jprocter@issues.jalview.org>
Mon, 14 Aug 2017 13:17:35 +0000 (14:17 +0100)
src/jalview/ws/jws2/AbstractJabaCalcWorker.java

index 3c5ce63..f2795d2 100644 (file)
@@ -497,8 +497,10 @@ public abstract class AbstractJabaCalcWorker extends AlignCalcWorker
           }
           for (int apos : sq.gapMap())
           {
+            char sqc = sq.getCharAt(apos);
             if (!filterNonStandardResidues
-                    || ResidueProperties.aaIndex[sq.getCharAt(apos)] < 20)
+                    || (sq.isProtein() ? ResidueProperties.aaIndex[sqc] < 20
+                            : ResidueProperties.nucleotideIndex[sqc] < 5))
             {
               gapMap[apos] = true; // aligned and real amino acid residue
             }