av.updateConservation();\r
av.updateConsensus();\r
\r
+ // Y O Y CLUSTALX\r
ColourSchemeI cs = av.getGlobalColourScheme();\r
if(cs instanceof ConservationColourScheme)\r
- cs = ( (ConservationColourScheme) cs).cs;\r
+ {\r
+ ConservationColourScheme ccs = (ConservationColourScheme) cs;\r
+ if(ccs.cs instanceof ClustalxColourScheme)\r
+ {\r
+ jalview.analysis.Conservation c = new jalview.analysis.Conservation\r
+ ("All",\r
+ ResidueProperties.propHash, 3,\r
+ av.alignment.getSequences(), 0,\r
+ av.alignment.getWidth() - 1);\r
+ c.calculate();\r
+ c.verdict(false, av.ConsPercGaps);\r
+\r
+ ClustalxColourScheme cxs = (ClustalxColourScheme)ccs.cs;\r
+ cxs.resetClustalX(av.alignment.getSequences(), av.alignment.getWidth());\r
+ ccs = new ConservationColourScheme(c, cxs);\r
+ av.setGlobalColourScheme(ccs);\r
+ }\r
+ }\r
\r
if(cs instanceof ClustalxColourScheme)\r
- cs = new ClustalxColourScheme(av.alignment.getSequences(), av.alignment.getWidth());\r
+ {\r
+ ((ClustalxColourScheme)cs).resetClustalX(av.alignment.getSequences(),\r
+ av.alignment.getWidth());\r
+ av.setGlobalColourScheme(cs);\r
+ }\r
\r
- ap.alignFrame.changeColour(cs);\r
\r
}\r
\r
import javax.swing.*;\r
import java.util.*;\r
import jalview.schemes.*;\r
+import jalview.analysis.Conservation;\r
\r
public class SeqPanel extends JPanel\r
{\r
av.updateConservation();\r
av.updateConsensus();\r
\r
+ // Y O Y CLUSTALX\r
ColourSchemeI cs = av.getGlobalColourScheme();\r
if(cs instanceof ConservationColourScheme)\r
- cs = ( (ConservationColourScheme) cs).cs;\r
+ {\r
+ ConservationColourScheme ccs = (ConservationColourScheme) cs;\r
+ if(ccs.cs instanceof ClustalxColourScheme)\r
+ {\r
+ Conservation c = new Conservation("All",\r
+ ResidueProperties.propHash, 3,\r
+ av.alignment.getSequences(), 0,\r
+ av.alignment.getWidth() - 1);\r
+ c.calculate();\r
+ c.verdict(false, av.ConsPercGaps);\r
+\r
+ ClustalxColourScheme cxs = (ClustalxColourScheme)ccs.cs;\r
+ cxs.resetClustalX(av.alignment.getSequences(), av.alignment.getWidth());\r
+ ccs = new ConservationColourScheme(c, cxs);\r
+ av.setGlobalColourScheme(ccs);\r
+ }\r
+ }\r
\r
if(cs instanceof ClustalxColourScheme)\r
- cs = new ClustalxColourScheme(av.alignment.getSequences(), av.alignment.getWidth());\r
-\r
- ap.alignFrame.changeColour(cs);\r
+ {\r
+ ((ClustalxColourScheme)cs).resetClustalX(av.alignment.getSequences(),\r
+ av.alignment.getWidth());\r
+ av.setGlobalColourScheme(cs);\r
+ }\r
\r
}\r
\r
repaint();\r
}\r
else\r
- {\r
- if(stretchGroup.cs !=null && stretchGroup.cs.canThreshold())\r
- {\r
- ResidueColourScheme rcs = (ResidueColourScheme) stretchGroup.cs;\r
SliderPanel.setPIDSliderSource(ap, stretchGroup.cs, stretchGroup.getName());\r
- }\r
-\r
- }\r
\r
\r
changeEndRes = false;\r