Updated with latest from mchmmer branch
[jalview.git] / src / jalview / workers / ConsensusThread.java
index 335529c..d6a4488 100644 (file)
@@ -50,7 +50,7 @@ public class ConsensusThread extends AlignCalcWorker
     try
     {
       AlignmentAnnotation consensus = getConsensusAnnotation();
-      AlignmentAnnotation gap = getGapAnnotation();
+      AlignmentAnnotation gap = getOccupancyAnnotation();
       if ((consensus == null && gap == null) || calcMan.isPending(this))
       {
         calcMan.workerComplete(this);
@@ -119,7 +119,7 @@ public class ConsensusThread extends AlignCalcWorker
   {
     AlignmentAnnotation consensus = getConsensusAnnotation();
     consensus.annotations = new Annotation[aWidth];
-    AlignmentAnnotation gap = getGapAnnotation();
+    AlignmentAnnotation gap = getOccupancyAnnotation();
     if (gap != null)
     {
       gap.annotations = new Annotation[aWidth];
@@ -137,7 +137,7 @@ public class ConsensusThread extends AlignCalcWorker
     ProfilesI hconsensus = AAFrequency.calculate(aseqs, width, 0, width,
             true);
 
-    alignViewport.setSequenceConsensusHash(hconsensus);
+    alignViewport.setConsensusProfiles(hconsensus);
     setColourSchemeConsensus(hconsensus);
   }
 
@@ -176,9 +176,9 @@ public class ConsensusThread extends AlignCalcWorker
    * 
    * @return
    */
-  protected AlignmentAnnotation getGapAnnotation()
+  protected AlignmentAnnotation getOccupancyAnnotation()
   {
-    return alignViewport.getAlignmentGapAnnotation();
+    return alignViewport.getOccupancyAnnotation();
   }
 
   /**
@@ -199,10 +199,10 @@ public class ConsensusThread extends AlignCalcWorker
             && hconsensus != null)
     {
       deriveConsensus(consensus, hconsensus);
-      AlignmentAnnotation gap = getGapAnnotation();
-      if (gap != null)
+      AlignmentAnnotation occupancy = getOccupancyAnnotation();
+      if (occupancy != null)
       {
-        deriveGap(gap, hconsensus);
+        deriveOccupancy(occupancy, hconsensus);
       }
     }
   }
@@ -219,7 +219,6 @@ public class ConsensusThread extends AlignCalcWorker
   protected void deriveConsensus(AlignmentAnnotation consensusAnnotation,
           ProfilesI hconsensus)
   {
-
     long nseq = getSequences().length;
     AAFrequency.completeConsensus(consensusAnnotation, hconsensus,
             hconsensus.getStartColumn(), hconsensus.getEndColumn() + 1,
@@ -235,11 +234,11 @@ public class ConsensusThread extends AlignCalcWorker
    * @param hconsensus
    *          the computed consensus data
    */
-  protected void deriveGap(AlignmentAnnotation gapAnnotation,
+  protected void deriveOccupancy(AlignmentAnnotation gapAnnotation,
           ProfilesI hconsensus)
   {
     long nseq = getSequences().length;
-    AAFrequency.completeGapAnnot(gapAnnotation, hconsensus,
+    AAFrequency.completeOccupancyAnnot(gapAnnotation, hconsensus,
             hconsensus.getStartColumn(), hconsensus.getEndColumn() + 1,
             nseq);
   }
@@ -252,6 +251,6 @@ public class ConsensusThread extends AlignCalcWorker
   protected Object getViewportConsensus()
   {
     // TODO convert ComplementConsensusThread to use Profile
-    return alignViewport.getSequenceConsensusHash();
+    return alignViewport.getConsensusProfiles();
   }
 }