JAL-961 store result of conservation analysis worker on the alignment viewport
authorJim Procter <jprocter@dundee.ac.uk>
Thu, 1 May 2014 13:32:45 +0000 (14:32 +0100)
committerJim Procter <jprocter@dundee.ac.uk>
Thu, 1 May 2014 13:32:45 +0000 (14:32 +0100)
src/jalview/api/AlignViewportI.java
src/jalview/viewmodel/AlignmentViewport.java
src/jalview/workers/ConservationThread.java

index 4f78145..44fef0e 100644 (file)
@@ -22,6 +22,7 @@ import java.awt.Color;
 import java.util.Hashtable;
 import java.util.Map;
 
+import jalview.analysis.Conservation;
 import jalview.datamodel.AlignmentAnnotation;
 import jalview.datamodel.AlignmentI;
 import jalview.datamodel.AlignmentView;
@@ -186,5 +187,7 @@ public interface AlignViewportI
 
   void setColumnSelection(ColumnSelection cs);
 
+  void setConservation(Conservation cons);
+
 
 }
index d49572d..7e383a9 100644 (file)
@@ -299,7 +299,13 @@ public abstract class AlignmentViewport implements AlignViewportI
    * view
    */
   protected Hashtable[] hStrucConsensus = null;
-
+  
+  protected Conservation hconservation = null;
+  @Override
+  public void setConservation(Conservation cons)
+  {
+    hconservation = cons;
+  }
   /**
    * percentage gaps allowed in a column before all amino acid properties should
    * be considered unconserved
index b6186d4..681007e 100644 (file)
@@ -125,7 +125,10 @@ public class ConservationThread extends AlignCalcWorker implements
   {
     if (b || !calcMan.isWorking(this) && cons != null
             && conservation != null && quality != null)
+    {
+      alignViewport.setConservation(cons);
       cons.completeAnnotations(conservation, quality, 0, alWidth);
+    }
   }
 
   @Override