From e2c4a2f38549ca11856aa94c6f75c2babfa78013 Mon Sep 17 00:00:00 2001 From: Jim Procter Date: Mon, 14 Aug 2017 14:17:35 +0100 Subject: [PATCH] JAL-2335 choose appropriate alphabet for filtering nonstandard symbols --- src/jalview/ws/jws2/AbstractJabaCalcWorker.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/jalview/ws/jws2/AbstractJabaCalcWorker.java b/src/jalview/ws/jws2/AbstractJabaCalcWorker.java index 3c5ce63..f2795d2 100644 --- a/src/jalview/ws/jws2/AbstractJabaCalcWorker.java +++ b/src/jalview/ws/jws2/AbstractJabaCalcWorker.java @@ -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 } -- 1.7.10.2