boolean displayBoxes;\r
boolean displayText;\r
boolean colourText;\r
- boolean aaFrequencyValid = false;\r
public Vector sequences = new Vector();\r
int width = -1;\r
public ColourSchemeI cs;\r
if(endRes>=col)\r
endRes = col;\r
\r
-\r
return true;\r
}\r
\r
{\r
if(!sequences.contains(s))\r
sequences.addElement(s);\r
+\r
+\r
+ if(cs!=null)\r
+ cs.setConsensus( AAFrequency.calculate(sequences, 0, getWidth()) );\r
+\r
+ if(cs instanceof ConservationColourScheme)\r
+ recalcConservation();\r
+ }\r
+\r
+ void recalcConservation()\r
+ {\r
+ Conservation c = new Conservation(groupName,\r
+ ResidueProperties.propHash, 3,\r
+ sequences, 0, getWidth());\r
+ c.calculate();\r
+ c.verdict(false, 25);\r
+ ConservationColourScheme ccs = (ConservationColourScheme)cs;\r
+ ccs.conserve = c;\r
}\r
\r
public void addOrRemove(SequenceI s)\r
public void deleteSequence(SequenceI s)\r
{\r
sequences.removeElement(s);\r
+\r
+ if(cs!=null)\r
+ cs.setConsensus( AAFrequency.calculate(sequences, 0, getWidth()) );\r
+\r
+ if(cs instanceof ConservationColourScheme)\r
+ recalcConservation();\r
}\r
\r
\r
return displayBoxes;\r
}\r
\r
- public Vector getAAFrequency()\r
- {\r
- if (aaFrequency == null || aaFrequencyValid == false)\r
- {\r
- aaFrequency = AAFrequency.calculate(sequences, 0, getWidth());\r
- aaFrequencyValid = true;\r
- }\r
- return aaFrequency;\r
- }\r
-\r
public int getWidth()\r
{\r
- System.out.println("it is called");\r
// MC This needs to get reset when characters are inserted and deleted\r
for (int i = 0; i < sequences.size(); i++)\r
{\r