JAL-2335 choose appropriate alphabet for filtering nonstandard symbols
[jalview.git] / 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
             }