JAL-3285 small code changes to ConsensusThread not included in merge
authortva <tva@10.205.251.175>
Wed, 5 Jun 2019 12:38:44 +0000 (13:38 +0100)
committertva <tva@10.205.251.175>
Wed, 5 Jun 2019 12:38:44 +0000 (13:38 +0100)
src/jalview/workers/ConsensusThread.java

index 2c4cbde..f5cad71 100644 (file)
@@ -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();
   }
 }