public static final float[] pidThresholds =
{ 80, 60, 40, };
- public static Hashtable codonHash = new Hashtable();
+ public static Map<String, List<String>> codonHash = new HashMap<String, List<String>>();
- public static Vector Lys = new Vector();
+ private static List<String> Lys = new ArrayList<String>();
- public static Vector Asn = new Vector();
+ private static List<String> Asn = new ArrayList<String>();
- public static Vector Gln = new Vector();
+ private static List<String> Gln = new ArrayList<String>();
- public static Vector His = new Vector();
+ private static List<String> His = new ArrayList<String>();
- public static Vector Glu = new Vector();
+ private static List<String> Glu = new ArrayList<String>();
- public static Vector Asp = new Vector();
+ private static List<String> Asp = new ArrayList<String>();
- public static Vector Tyr = new Vector();
+ private static List<String> Tyr = new ArrayList<String>();
- public static Vector Thr = new Vector();
+ private static List<String> Thr = new ArrayList<String>();
- public static Vector Pro = new Vector();
+ private static List<String> Pro = new ArrayList<String>();
- public static Vector Ala = new Vector();
+ private static List<String> Ala = new ArrayList<String>();
- public static Vector Ser = new Vector();
+ private static List<String> Ser = new ArrayList<String>();
- public static Vector Arg = new Vector();
+ private static List<String> Arg = new ArrayList<String>();
- public static Vector Gly = new Vector();
+ private static List<String> Gly = new ArrayList<String>();
- public static Vector Trp = new Vector();
+ private static List<String> Trp = new ArrayList<String>();
- public static Vector Cys = new Vector();
+ private static List<String> Cys = new ArrayList<String>();
- public static Vector Ile = new Vector();
+ private static List<String> Ile = new ArrayList<String>();
- public static Vector Met = new Vector();
+ private static List<String> Met = new ArrayList<String>();
- public static Vector Leu = new Vector();
+ private static List<String> Leu = new ArrayList<String>();
- public static Vector Val = new Vector();
+ private static List<String> Val = new ArrayList<String>();
- public static Vector Phe = new Vector();
+ private static List<String> Phe = new ArrayList<String>();
public static List<String> STOP = new ArrayList<String>();
static
{
- Lys.addElement("AAA");
- Lys.addElement("AAG");
- Asn.addElement("AAC");
- Asn.addElement("AAT");
-
- Gln.addElement("CAA");
- Gln.addElement("CAG");
- His.addElement("CAC");
- His.addElement("CAT");
-
- Glu.addElement("GAA");
- Glu.addElement("GAG");
- Asp.addElement("GAC");
- Asp.addElement("GAT");
-
- Tyr.addElement("TAC");
- Tyr.addElement("TAT");
-
- Thr.addElement("ACA");
- Thr.addElement("ACG");
- Thr.addElement("ACC");
- Thr.addElement("ACT");
-
- Pro.addElement("CCA");
- Pro.addElement("CCG");
- Pro.addElement("CCC");
- Pro.addElement("CCT");
-
- Ala.addElement("GCA");
- Ala.addElement("GCG");
- Ala.addElement("GCC");
- Ala.addElement("GCT");
-
- Ser.addElement("TCA");
- Ser.addElement("TCG");
- Ser.addElement("TCC");
- Ser.addElement("TCT");
- Ser.addElement("AGC");
- Ser.addElement("AGT");
-
- Arg.addElement("AGA");
- Arg.addElement("AGG");
- Arg.addElement("CGA");
- Arg.addElement("CGG");
- Arg.addElement("CGC");
- Arg.addElement("CGT");
-
- Gly.addElement("GGA");
- Gly.addElement("GGG");
- Gly.addElement("GGC");
- Gly.addElement("GGT");
+ Lys.add("AAA");
+ Lys.add("AAG");
+ Asn.add("AAC");
+ Asn.add("AAT");
+
+ Gln.add("CAA");
+ Gln.add("CAG");
+ His.add("CAC");
+ His.add("CAT");
+
+ Glu.add("GAA");
+ Glu.add("GAG");
+ Asp.add("GAC");
+ Asp.add("GAT");
+
+ Tyr.add("TAC");
+ Tyr.add("TAT");
+
+ Thr.add("ACA");
+ Thr.add("ACG");
+ Thr.add("ACC");
+ Thr.add("ACT");
+
+ Pro.add("CCA");
+ Pro.add("CCG");
+ Pro.add("CCC");
+ Pro.add("CCT");
+
+ Ala.add("GCA");
+ Ala.add("GCG");
+ Ala.add("GCC");
+ Ala.add("GCT");
+
+ Ser.add("TCA");
+ Ser.add("TCG");
+ Ser.add("TCC");
+ Ser.add("TCT");
+ Ser.add("AGC");
+ Ser.add("AGT");
+
+ Arg.add("AGA");
+ Arg.add("AGG");
+ Arg.add("CGA");
+ Arg.add("CGG");
+ Arg.add("CGC");
+ Arg.add("CGT");
+
+ Gly.add("GGA");
+ Gly.add("GGG");
+ Gly.add("GGC");
+ Gly.add("GGT");
STOP.add("TGA");
STOP.add("TAA");
STOP.add("TAG");
- Trp.addElement("TGG");
+ Trp.add("TGG");
- Cys.addElement("TGC");
- Cys.addElement("TGT");
+ Cys.add("TGC");
+ Cys.add("TGT");
- Ile.addElement("ATA");
- Ile.addElement("ATC");
- Ile.addElement("ATT");
+ Ile.add("ATA");
+ Ile.add("ATC");
+ Ile.add("ATT");
- Met.addElement("ATG");
+ Met.add("ATG");
- Leu.addElement("CTA");
- Leu.addElement("CTG");
- Leu.addElement("CTC");
- Leu.addElement("CTT");
- Leu.addElement("TTA");
- Leu.addElement("TTG");
+ Leu.add("CTA");
+ Leu.add("CTG");
+ Leu.add("CTC");
+ Leu.add("CTT");
+ Leu.add("TTA");
+ Leu.add("TTG");
- Val.addElement("GTA");
- Val.addElement("GTG");
- Val.addElement("GTC");
- Val.addElement("GTT");
+ Val.add("GTA");
+ Val.add("GTG");
+ Val.add("GTC");
+ Val.add("GTT");
- Phe.addElement("TTC");
- Phe.addElement("TTT");
+ Phe.add("TTC");
+ Phe.add("TTT");
}
// Stores residue codes/names and colours and other things
{
return "X";
}
- Enumeration e = codonHash.keys();
-
- while (e.hasMoreElements())
+ for (String key : codonHash.keySet())
{
- String key = (String) e.nextElement();
- Vector tmp = (Vector) codonHash.get(key);
-
- if (tmp.contains(codon))
+ if (codonHash.get(key).contains(codon))
{
return key;
}