From: amwaterhouse <Andrew Waterhouse> Date: Thu, 1 Feb 2007 18:02:57 +0000 (+0000) Subject: find colours uncommented X-Git-Tag: Release_2_3~390 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=2a150c6b5f2227a772f1383b5409d2f49b1efeaf;p=jalview.git find colours uncommented --- diff --git a/src/MCview/PDBChain.java b/src/MCview/PDBChain.java index 1b65c48..773b263 100755 --- a/src/MCview/PDBChain.java +++ b/src/MCview/PDBChain.java @@ -105,7 +105,7 @@ public class PDBChain { return null; sq = sq.getDatasetSequence(); } - /** + /** * Remove any existing features for this chain if they exist ? * SequenceFeature[] seqsfeatures=seq.getSequenceFeatures(); int totfeat=seqsfeatures.length; @@ -198,11 +198,11 @@ public class PDBChain { //Make a new Residue object with the new atoms vector residues.addElement(new Residue(resAtoms, resNumber - 1, count)); - + Residue tmpres = (Residue) residues.lastElement(); Atom tmpat = (Atom) tmpres.atoms.elementAt(0); // Make A new SequenceFeature for the current residue numbering - SequenceFeature sf = + SequenceFeature sf = new SequenceFeature("RESNUM",tmpat.resName+":"+tmpat.resNumIns+" "+pdbid+id, "",offset+count,offset+count,MCview.PDBChain.PDBFILEFEATURE); resFeatures.addElement(sf); @@ -222,8 +222,8 @@ public class PDBChain { if(id.length()<1 || id.equals(" ")) id = "_"; - - sequence = new Sequence(id, seq.toString(), offset, resNumber-1); // Note: resNumber-offset ~= seq.size() + + sequence = new Sequence(id, seq.toString(), offset, resNumber-1); // Note: resNumber-offset ~= seq.size() // System.out.println("PDB Sequence is :\nSequence = " + seq); // System.out.println("No of residues = " + residues.size()); for (i=0,iSize=resFeatures.size(); i<iSize; i++) { @@ -246,8 +246,7 @@ public class PDBChain { } else if (b.at1.resName.equalsIgnoreCase("CYS")) { b.startCol = Color.yellow; } else { - //int atno = ((Integer) ResidueProperties.getAA3Hash().get(b.at1.resName.toUpperCase())).intValue(); - b.startCol = Color.lightGray; + b.startCol = Color.lightGray; } if (b.at2.resName.equalsIgnoreCase("ASP") || @@ -259,8 +258,7 @@ public class PDBChain { } else if (b.at2.resName.equalsIgnoreCase("CYS")) { b.endCol = Color.yellow; } else { - //int atno = ((Integer) ResidueProperties.getAA3Hash().get(b.at2.resName.toUpperCase())).intValue(); - b.endCol = Color.lightGray; + b.endCol = Color.lightGray; } } catch (Exception e) { Bond b = (Bond) bonds.elementAt(i); @@ -274,19 +272,18 @@ public class PDBChain { public void setChainColours(jalview.schemes.ColourSchemeI cs) { Bond b; + int index; for (int i = 0; i < bonds.size(); i++) { try { b = (Bond) bonds.elementAt(i); - /* ( (Bond) bonds.elementAt(i)).startCol = cs.findColour( - ResidueProperties.codonTranslate( - ResidueProperties.aa3Hash.get(b.at1.resName).toString().charAt(0) - ); + index = ( (Integer) ResidueProperties.aa3Hash.get(b.at1. + resName)).intValue(); + b.startCol = cs.findColour(ResidueProperties.aa[index].charAt(0)); - b.endCol = cs.findColour( - ResidueProperties.aa[ ( (Integer) ResidueProperties.aa3Hash. - get(b.at2.resName)).intValue()] - );*/ + index = ( (Integer) ResidueProperties.aa3Hash.get(b.at2.resName)). + intValue(); + b.endCol = cs.findColour(ResidueProperties.aa[index].charAt(0)); } catch (Exception e) {