X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fschemes%2FResidueProperties.java;h=65cc0f1181d99dd9d97b8e1aa4316303e9ae7c9d;hb=95789943eb181b1768a081e779a044bf595b6bf6;hp=a382662a22f87064c10cfd6632868fd2ed3e085e;hpb=8a18973f7e4521c7dd3705ebd8fabd3ca08cfcaf;p=jalview.git diff --git a/src/jalview/schemes/ResidueProperties.java b/src/jalview/schemes/ResidueProperties.java index a382662..65cc0f1 100755 --- a/src/jalview/schemes/ResidueProperties.java +++ b/src/jalview/schemes/ResidueProperties.java @@ -29,6 +29,7 @@ public class ResidueProperties public static final Hashtable aa3Hash = new Hashtable(); public static final Hashtable aa2Triplet = new Hashtable(); public static final Hashtable nucleotideHash = new Hashtable(); + public static final Hashtable nucleotideName = new Hashtable(); static { @@ -89,27 +90,49 @@ public class ResidueProperties static { nucleotideHash.put("A", new Integer(0)); - nucleotideHash.put("C", new Integer(1)); - nucleotideHash.put("G", new Integer(2)); - nucleotideHash.put("T", new Integer(3)); - nucleotideHash.put("U", new Integer(4)); nucleotideHash.put("a", new Integer(0)); + nucleotideHash.put("C", new Integer(1)); nucleotideHash.put("c", new Integer(1)); + nucleotideHash.put("G", new Integer(2)); nucleotideHash.put("g", new Integer(2)); + nucleotideHash.put("T", new Integer(3)); nucleotideHash.put("t", new Integer(3)); + nucleotideHash.put("U", new Integer(4)); nucleotideHash.put("u", new Integer(4)); + nucleotideHash.put("I", new Integer(5)); + nucleotideHash.put("i", new Integer(5)); + nucleotideHash.put("X", new Integer(6)); + nucleotideHash.put("x", new Integer(6)); + nucleotideHash.put("R", new Integer(7)); + nucleotideHash.put("r", new Integer(7)); + nucleotideHash.put("Y", new Integer(8)); + nucleotideHash.put("y", new Integer(8)); + nucleotideHash.put("N", new Integer(9)); + nucleotideHash.put("n", new Integer(9)); + + + nucleotideName.put("A", "Adenine"); + nucleotideName.put("a", "Adenine"); + nucleotideName.put("G", "Guanine"); + nucleotideName.put("g", "Guanine"); + nucleotideName.put("C", "Cytosine"); + nucleotideName.put("c", "Cytosine"); + nucleotideName.put("T", "Thymine"); + nucleotideName.put("t", "Thymine"); + nucleotideName.put("U", "Uracil"); + nucleotideName.put("u", "Uracil"); + nucleotideName.put("I", "Inosine"); + nucleotideName.put("i", "Inosine"); + nucleotideName.put("X", "Xanthine"); + nucleotideName.put("x", "Xanthine"); + nucleotideName.put("R", "Unknown Purine"); + nucleotideName.put("r", "Unknown Purine"); + nucleotideName.put("Y", "Unknown Pyrimidine"); + nucleotideName.put("y", "Unknown Pyrimidine"); + nucleotideName.put("N", "Unknown"); + nucleotideName.put("n", "Unknown"); } - // These numbers should correspond to the indices in the Color hashes - public static final Hashtable aaSpecialsHash = new Hashtable(); - - static - { - aaSpecialsHash.put("-", new Integer(23)); - aaSpecialsHash.put("*", new Integer(24)); - aaSpecialsHash.put(".", new Integer(25)); - aaSpecialsHash.put(" ", new Integer(26)); - } static { @@ -133,9 +156,10 @@ public class ResidueProperties aa3Hash.put("TRP", new Integer(17)); aa3Hash.put("TYR", new Integer(18)); aa3Hash.put("VAL", new Integer(19)); - aa3Hash.put("B", new Integer(20)); - aa3Hash.put("Z", new Integer(21)); - aa3Hash.put("X", new Integer(22)); + // IUB Nomenclature for ambiguous peptides + aa3Hash.put("ASX", new Integer(20)); // "B"; + aa3Hash.put("GLX", new Integer(21)); // X + aa3Hash.put("XAA", new Integer(22));// X unknown aa3Hash.put("-", new Integer(23)); aa3Hash.put("*", new Integer(23)); aa3Hash.put(".", new Integer(23)); @@ -800,27 +824,6 @@ public class ResidueProperties Phe.addElement("TTT"); } - public static Color[][] groupColors = - { - { - Color.red, Color.red.brighter(), Color.red.brighter().brighter()}, - { - Color.orange, Color.orange.brighter(), - Color.orange.brighter().brighter() - }, - { - Color.green, Color.green.brighter(), Color.green.brighter().brighter()}, - { - Color.blue, Color.blue.brighter(), Color.blue.brighter().brighter()}, - { - Color.magenta, Color.magenta.brighter(), - Color.magenta.brighter().brighter() - }, - { - Color.cyan, Color.cyan.brighter(), Color.cyan.brighter().brighter()}, - { - Color.pink, Color.pink.brighter(), Color.pink.brighter().brighter()}, - }; //Stores residue codes/names and colours and other things public static Hashtable propHash = new Hashtable(); @@ -1111,20 +1114,6 @@ public class ResidueProperties propHash.put("polar", polar); } - public static Hashtable chainColours = new Hashtable(); - - static - { - chainColours.put("A", Color.red); - chainColours.put("B", Color.orange); - chainColours.put("C", Color.yellow); - chainColours.put("D", Color.green); - chainColours.put("E", Color.cyan); - chainColours.put("F", Color.blue); - chainColours.put("G", Color.magenta); - chainColours.put("H", Color.pink); - } - private ResidueProperties() { } @@ -1210,7 +1199,7 @@ public class ResidueProperties String key = (String) e.nextElement(); Vector tmp = (Vector) codonHash.get(key); - if (tmp.contains(codon)) + if (tmp.contains(codon.toUpperCase())) { return key; } @@ -1218,9 +1207,4 @@ public class ResidueProperties return null; } - - public static Hashtable getChainColours() - { - return chainColours; - } }