From 8f1b417b654a575bf7a368b4edeffee813042a5c Mon Sep 17 00:00:00 2001 From: Jim Procter Date: Thu, 1 May 2014 14:32:45 +0100 Subject: [PATCH] JAL-961 store result of conservation analysis worker on the alignment viewport --- src/jalview/api/AlignViewportI.java | 3 +++ src/jalview/viewmodel/AlignmentViewport.java | 8 +++++++- src/jalview/workers/ConservationThread.java | 3 +++ 3 files changed, 13 insertions(+), 1 deletion(-) diff --git a/src/jalview/api/AlignViewportI.java b/src/jalview/api/AlignViewportI.java index 4f78145..44fef0e 100644 --- a/src/jalview/api/AlignViewportI.java +++ b/src/jalview/api/AlignViewportI.java @@ -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); + } diff --git a/src/jalview/viewmodel/AlignmentViewport.java b/src/jalview/viewmodel/AlignmentViewport.java index d49572d..7e383a9 100644 --- a/src/jalview/viewmodel/AlignmentViewport.java +++ b/src/jalview/viewmodel/AlignmentViewport.java @@ -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 diff --git a/src/jalview/workers/ConservationThread.java b/src/jalview/workers/ConservationThread.java index b6186d4..681007e 100644 --- a/src/jalview/workers/ConservationThread.java +++ b/src/jalview/workers/ConservationThread.java @@ -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 -- 1.7.10.2