X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fworkers%2FConsensusThread.java;fp=src%2Fjalview%2Fworkers%2FConsensusThread.java;h=1cce3fff9d0eade7f5e0daa41a1ef460e57dd2b1;hb=679e63aab1a22d128bf429a07514eb15f8b288e1;hp=5c55d48455e1b4cdf8fdb3b4c484838363711a2a;hpb=41c34ccf7054239554932deca6f64042231977b5;p=jalview.git diff --git a/src/jalview/workers/ConsensusThread.java b/src/jalview/workers/ConsensusThread.java index 5c55d48..1cce3ff 100644 --- a/src/jalview/workers/ConsensusThread.java +++ b/src/jalview/workers/ConsensusThread.java @@ -119,7 +119,8 @@ public class ConsensusThread extends AlignCalcWorker AlignmentAnnotation consensus = getConsensusAnnotation(); consensus.annotations = new Annotation[aWidth]; AlignmentAnnotation gap = getGapAnnotation(); - if (gap!=null) { + if (gap != null) + { gap.annotations = new Annotation[aWidth]; } } @@ -132,8 +133,8 @@ public class ConsensusThread extends AlignCalcWorker SequenceI[] aseqs = getSequences(); int width = alignment.getWidth(); - ProfilesI hconsensus = AAFrequency.calculate(aseqs, width, 0, - width, true); + ProfilesI hconsensus = AAFrequency.calculate(aseqs, width, 0, width, + true); alignViewport.setSequenceConsensusHash(hconsensus); setColourSchemeConsensus(hconsensus); @@ -221,29 +222,26 @@ public class ConsensusThread extends AlignCalcWorker long nseq = getSequences().length; AAFrequency.completeConsensus(consensusAnnotation, hconsensus, - hconsensus.getStartColumn(), - hconsensus.getEndColumn() + 1, + hconsensus.getStartColumn(), hconsensus.getEndColumn() + 1, alignViewport.isIgnoreGapsConsensus(), alignViewport.isShowSequenceLogo(), nseq); } - /** - * Convert the computed consensus data into a gap annotation row for - * display. - * - * @param gapAnnotation - * the annotation to be populated - * @param hconsensus - * the computed consensus data - */ - protected void deriveGap(AlignmentAnnotation gapAnnotation, - ProfilesI hconsensus) - { - long nseq = getSequences().length; - AAFrequency.completeGapAnnot(gapAnnotation, hconsensus, + /** + * Convert the computed consensus data into a gap annotation row for display. + * + * @param gapAnnotation + * the annotation to be populated + * @param hconsensus + * the computed consensus data + */ + protected void deriveGap(AlignmentAnnotation gapAnnotation, + ProfilesI hconsensus) + { + long nseq = getSequences().length; + AAFrequency.completeGapAnnot(gapAnnotation, hconsensus, hconsensus.getStartColumn(), hconsensus.getEndColumn() + 1, nseq); - } /**