From fda3adcb9abc603b03188404f532a5bc8097dd55 Mon Sep 17 00:00:00 2001 From: Jim Procter Date: Sun, 13 Aug 2017 15:34:58 +0100 Subject: [PATCH] JAL-2663 flag and filter to exclude non-standard amino acids from submission --- src/jalview/ws/jws2/AbstractJabaCalcWorker.java | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/src/jalview/ws/jws2/AbstractJabaCalcWorker.java b/src/jalview/ws/jws2/AbstractJabaCalcWorker.java index f94d18c..c691fee 100644 --- a/src/jalview/ws/jws2/AbstractJabaCalcWorker.java +++ b/src/jalview/ws/jws2/AbstractJabaCalcWorker.java @@ -30,6 +30,7 @@ import jalview.datamodel.AnnotatedCollectionI; import jalview.datamodel.SequenceI; import jalview.gui.AlignFrame; import jalview.gui.IProgressIndicator; +import jalview.schemes.ResidueProperties; import jalview.workers.AlignCalcWorker; import jalview.ws.jws2.dm.AAConSettings; import jalview.ws.jws2.dm.JabaWsParamSet; @@ -63,6 +64,11 @@ public abstract class AbstractJabaCalcWorker extends AlignCalcWorker protected boolean submitGaps = true; /** + * by default, we filter out non-standard residues before submission + */ + private boolean filterNonStandardResidues = true; + + /** * Recover any existing parameters for this service */ protected void initViewportParams() @@ -491,7 +497,12 @@ public abstract class AbstractJabaCalcWorker extends AlignCalcWorker } for (int apos : sq.gapMap()) { - gapMap[apos] = true; // aligned. + if (!filterNonStandardResidues + || ResidueProperties.aaIndex[sq.getCharAt(apos)] < 20) + { + gapMap[apos] = true; // aligned and real amino acid residue + } + ; } } else -- 1.7.10.2