+ this.startRes = 0;\r
+ this.endRes = al.getWidth()-1;\r
+ this.startSeq = 0;\r
+ this.endSeq = al.getHeight()-1;\r
+ this.showText = showText;\r
+ this.showBoxes = showBoxes;\r
+ this.wrapAlignment = wrapAlignment;\r
+\r
+ setAlignment(al);\r
+ setFont( font );\r
+ }\r
+\r
+ public void showSequenceFeatures(boolean b)\r
+ {\r
+ showSequenceFeatures = b;\r
+ }\r
+\r
+ AlignmentAnnotation consensus;\r
+ AlignmentAnnotation conservation;\r
+ public void updateConservation()\r
+ {\r
+ Annotation [] annotations = new Annotation[alignment.getWidth()];\r
+\r
+ Conservation cons = new jalview.analysis.Conservation("All",\r
+ jalview.schemes.ResidueProperties.propHash, 3,\r
+ alignment.getSequences(), 0,\r
+ alignment.getWidth());\r
+ cons.calculate();\r
+ cons.verdict(false, 100);\r
+\r
+ String sequence = cons.getConsSequence().getSequence();\r
+ for (int i = 0; i < alignment.getWidth(); i++)\r
+ {\r
+ int value = 0;\r
+ try\r
+ {\r
+ value = Integer.parseInt(sequence.charAt(i) + "");\r
+ }\r
+ catch (Exception ex)\r
+ {\r
+ if (sequence.charAt(i) == '*') value = 10;\r
+ }\r
+\r
+ annotations[i] = new Annotation(sequence.charAt(i) + "",\r
+ "Conservation graph", ' ', value);\r
+ }\r
+\r
+ if(conservation==null)\r
+ {\r
+ conservation = new AlignmentAnnotation("Conservation",\r
+ "Conservation of total alignment",\r
+ annotations, 0, 10, 1);\r
+ alignment.addAnnotation(conservation);\r
+ }\r
+ else\r
+ conservation.annotations = annotations;\r
+\r