X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fschemes%2FResidueProperties.java;h=25707ea0f0549570b224dd58be8e4b6fca08affd;hb=a0d1b1826f8ab0792c589946746d52ad0316fc99;hp=f92bfd12601c61862a61f5f7086d55444123003a;hpb=c3a5f5735df3a8e85818a6dd1e3f1d614060b721;p=jalview.git diff --git a/src/jalview/schemes/ResidueProperties.java b/src/jalview/schemes/ResidueProperties.java index f92bfd1..25707ea 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 { @@ -55,6 +56,7 @@ public class ResidueProperties aaHash.put("B", new Integer(20)); aaHash.put("Z", new Integer(21)); aaHash.put("X", new Integer(22)); + aaHash.put("U", new Integer(22)); aaHash.put("a", new Integer(0)); aaHash.put("r", new Integer(1)); aaHash.put("n", new Integer(2)); @@ -78,6 +80,7 @@ public class ResidueProperties aaHash.put("b", new Integer(20)); aaHash.put("z", new Integer(21)); aaHash.put("x", new Integer(22)); + aaHash.put("u", new Integer(22)); aaHash.put("-", new Integer(23)); aaHash.put("*", new Integer(23)); aaHash.put(".", new Integer(23)); @@ -87,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 { @@ -1208,7 +1233,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; }