From: amwaterhouse Date: Wed, 15 Dec 2004 17:29:19 +0000 (+0000) Subject: colours are right, but not the conservation bit!! X-Git-Tag: Release_2_0~799 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=88706aa93cd35546349b8ef7f84fb2df64387d8b;p=jalview.git colours are right, but not the conservation bit!! --- diff --git a/src/jalview/schemes/ClustalxColourScheme.java b/src/jalview/schemes/ClustalxColourScheme.java index 0479e5c..3a91018 100755 --- a/src/jalview/schemes/ClustalxColourScheme.java +++ b/src/jalview/schemes/ClustalxColourScheme.java @@ -15,7 +15,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -/* + package jalview.schemes; import java.util.*; import java.awt.*; @@ -191,55 +191,43 @@ public class ClustalxColourScheme implements ColourSchemeI ResidueColour[19] = colours[0]; // V } - public Color findColour(DrawableSequence seq, String s, int j) { - // System.out.println("Finding colour for " + s + " " + j); - int i = seq.num[j]; - Color c = Color.white; - for (int k=0; k < ResidueColour[i].conses.length ; k++) { - if (ResidueColour[i].conses[k].isConserved(cons2,j,seq.num[j],size)) { - c = ResidueColour[i].c; - } - } - if (i ==4) { - if (conses[27].isConserved(cons2,j,seq.num[j],size)) { - c = (Color)colhash.get("PINK"); - } - } - return c; + public Color findColour(String s) + { + return Color.pink; } - public void setColours(DrawableSequence seq, int j) { - Color c = Color.white; + public Color findColour(String s, int j, Vector seqs) + { - String s = seq.getSequence().substring(j,j+1); - try { - c = findColour(seq,s,j); - seq.setResidueBoxColour(j,c); - } catch (Exception e) { - seq.setResidueBoxColour(j,Color.white); - } - } + int i = Integer.parseInt( ResidueProperties.aaHash.get(s).toString() ); - public void setColours(DrawableSequence s) { - for (int j = 0; j < s.sequence.length(); j++) { - setColours(s,j); - } + return ResidueColour[i].c; } - public void setColours(SequenceGroup sg) { - for (int j = 0; j < sg.sequences.size(); j++) { + public boolean canThreshold() + { + return false; + } - DrawableSequence s = (DrawableSequence)sg.sequences.elementAt(j); - for (int i = 0; i < s.getSequence().length();i++) { - setColours(s,i); - } - } + public boolean isUserDefinable() + { + return false; } +} + +class ConsensusColour { + + Consensus[] conses; + Color c; + public ConsensusColour(Color c,Consensus[] conses) { + this.conses = conses; + // this.list = list; + this.c = c; + } } -*/