From: tva Date: Wed, 5 Jun 2019 12:38:44 +0000 (+0100) Subject: JAL-3285 small code changes to ConsensusThread not included in merge X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=bfdbaf7f1a8c1e4cad9af35075ffbe55f7f5683e;p=jalview.git JAL-3285 small code changes to ConsensusThread not included in merge --- diff --git a/src/jalview/workers/ConsensusThread.java b/src/jalview/workers/ConsensusThread.java index 2c4cbde..f5cad71 100644 --- a/src/jalview/workers/ConsensusThread.java +++ b/src/jalview/workers/ConsensusThread.java @@ -50,7 +50,7 @@ public class ConsensusThread extends AlignCalcWorker try { AlignmentAnnotation consensus = getConsensusAnnotation(); - AlignmentAnnotation gap = getOccupancyAnnotation(); + AlignmentAnnotation gap = getGapAnnotation(); if ((consensus == null && gap == null) || calcMan.isPending(this)) { calcMan.workerComplete(this); @@ -140,7 +140,7 @@ public class ConsensusThread extends AlignCalcWorker ProfilesI hconsensus = AAFrequency.calculate(aseqs, width, 0, width, true); - alignViewport.setConsensusProfiles(hconsensus); + alignViewport.setSequenceConsensusHash(hconsensus); setColourSchemeConsensus(hconsensus); } @@ -179,9 +179,9 @@ public class ConsensusThread extends AlignCalcWorker * * @return */ - protected AlignmentAnnotation getOccupancyAnnotation() + protected AlignmentAnnotation getGapAnnotation() { - return alignViewport.getOccupancyAnnotation(); + return alignViewport.getAlignmentGapAnnotation(); } /** @@ -202,10 +202,10 @@ public class ConsensusThread extends AlignCalcWorker && hconsensus != null) { deriveConsensus(consensus, hconsensus); - AlignmentAnnotation occupancy = getOccupancyAnnotation(); - if (occupancy != null) + AlignmentAnnotation gap = getGapAnnotation(); + if (gap != null) { - deriveOccupancy(occupancy, hconsensus); + deriveOccupancy(gap, hconsensus); } } } @@ -237,11 +237,11 @@ public class ConsensusThread extends AlignCalcWorker * @param hconsensus * the computed consensus data */ - protected void deriveOccupancy(AlignmentAnnotation gapAnnotation, + protected void deriveGap(AlignmentAnnotation gapAnnotation, ProfilesI hconsensus) { long nseq = getSequences().length; - AAFrequency.completeOccupancyAnnot(gapAnnotation, hconsensus, + AAFrequency.completeGapAnnot(gapAnnotation, hconsensus, hconsensus.getStartColumn(), hconsensus.getEndColumn() + 1, nseq); } @@ -254,6 +254,6 @@ public class ConsensusThread extends AlignCalcWorker protected Object getViewportConsensus() { // TODO convert ComplementConsensusThread to use Profile - return alignViewport.getConsensusProfiles(); + return alignViewport.getSequenceConsensusHash(); } }