showQuality may be updated during archive file load
authoramwaterhouse <Andrew Waterhouse>
Thu, 12 Oct 2006 17:15:45 +0000 (17:15 +0000)
committeramwaterhouse <Andrew Waterhouse>
Thu, 12 Oct 2006 17:15:45 +0000 (17:15 +0000)
src/jalview/gui/AlignViewport.java

index 7d02e14..9a7df7f 100755 (executable)
@@ -212,6 +212,7 @@ public class AlignViewport
                                                 0f,
                                                 11f,
                                                 AlignmentAnnotation.BAR_GRAPH);
+              quality.hasText = true;
 
               alignment.addAnnotation(quality);
             }
@@ -278,8 +279,6 @@ public class AlignViewport
       {
         try
         {
-          long t = System.currentTimeMillis();
-
           int alWidth = alignment.getWidth();
 
           Conservation cons = new jalview.analysis.Conservation("All",
@@ -289,14 +288,11 @@ public class AlignViewport
           cons.calculate();
           cons.verdict(false, ConsPercGaps);
 
-          if (showQuality)
+          if (quality!=null)
           {
             cons.findQuality();
           }
 
-          System.out.println("Conservation took " + (System.currentTimeMillis() - t) +
-                             "ms");
-
 
           String sequence = cons.getConsSequence().getSequence();
           float minR;
@@ -321,8 +317,9 @@ public class AlignViewport
 
           conservation.annotations = new Annotation[alWidth];
 
-          if (showQuality)
+          if (quality!=null)
           {
+            quality.graphMax = cons.qualityRange[1].floatValue();
             quality.annotations = new Annotation[alWidth];
             qmin = cons.qualityRange[0].floatValue();
             qmax = cons.qualityRange[1].floatValue();
@@ -351,7 +348,7 @@ public class AlignViewport
                                          minB + (maxB * vprop)));
 
             // Quality calc
-            if (showQuality)
+            if (quality!=null)
             {
               value = ( (Double) cons.quality.get(i)).floatValue();
               vprop = value - qmin;
@@ -363,11 +360,6 @@ public class AlignViewport
                   minB + (maxB * vprop)));
             }
           }
-
-          if (quality != null)
-          {
-            quality.graphMax = cons.qualityRange[1].floatValue();
-          }
         }
         catch (OutOfMemoryError error)
         {
@@ -466,16 +458,13 @@ public class AlignViewport
           consensus.annotations = null;
           consensus.annotations = new Annotation[aWidth];
 
-          long t = System.currentTimeMillis();
+
           hconsensus = new Hashtable[aWidth];
           AAFrequency.calculate(alignment.getSequencesArray(),
                                 0,
                                 alignment.getWidth(),
                                 hconsensus);
 
-          System.out.println("Consensus took " +
-                             (System.currentTimeMillis() - t) + "ms");
-
           for (int i = 0; i < aWidth; i++)
           {
             float value = 0;