Calculate alWidth earlier
authoramwaterhouse <Andrew Waterhouse>
Tue, 10 Oct 2006 14:10:35 +0000 (14:10 +0000)
committeramwaterhouse <Andrew Waterhouse>
Tue, 10 Oct 2006 14:10:35 +0000 (14:10 +0000)
src/jalview/gui/AlignViewport.java

index 743c8dd..7d02e14 100755 (executable)
@@ -280,9 +280,11 @@ public class AlignViewport
         {
           long t = System.currentTimeMillis();
 
+          int alWidth = alignment.getWidth();
+
           Conservation cons = new jalview.analysis.Conservation("All",
               jalview.schemes.ResidueProperties.propHash, 3,
-              alignment.getSequences(), 0, alignment.getWidth() - 1);
+              alignment.getSequences(), 0, alWidth -1);
 
           cons.calculate();
           cons.verdict(false, ConsPercGaps);
@@ -295,7 +297,7 @@ public class AlignViewport
           System.out.println("Conservation took " + (System.currentTimeMillis() - t) +
                              "ms");
 
-          int alWidth = alignment.getWidth();
+
           String sequence = cons.getConsSequence().getSequence();
           float minR;
           float minG;