From: jprocter Date: Fri, 28 Oct 2011 14:45:53 +0000 (+0100) Subject: (JAL-885,JAL-580) structure consensus should only be calculated for valid RNA structu... X-Git-Tag: Jalview_2_9~565^2~9 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=471a99eebdcb33c3a977abc3e2fb228286590fc3;p=jalview.git (JAL-885,JAL-580) structure consensus should only be calculated for valid RNA structure annotation --- diff --git a/src/jalview/workers/StrucConsensusThread.java b/src/jalview/workers/StrucConsensusThread.java index eda64b5..9143ad7 100644 --- a/src/jalview/workers/StrucConsensusThread.java +++ b/src/jalview/workers/StrucConsensusThread.java @@ -61,6 +61,7 @@ public class StrucConsensusThread extends AlignCalcWorker implements AlignCalcWo AlignmentAnnotation[] aa = alignViewport.getAlignment() .getAlignmentAnnotation(); AlignmentAnnotation rnaStruc = null; + // select rna struct to use for calculation for (int i = 0; i < aa.length; i++) { if (aa[i].getRNAStruc() != null) @@ -69,7 +70,14 @@ public class StrucConsensusThread extends AlignCalcWorker implements AlignCalcWo break; } } - + // check to see if its valid + + if (rnaStruc==null || !rnaStruc.isValidStruc()) + { + calcMan.workerComplete(this); + return; + } + jalview.analysis.StructureFrequency.calculate(alignment.getSequencesArray(), 0, alignment.getWidth(), hStrucConsensus, true, rnaStruc); alignViewport.setRnaStructureConsensusHash(hStrucConsensus);