/*
* Jalview - A Sequence Alignment Editor and Viewer
- * Copyright (C) 2006 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle
+ * Copyright (C) 2007 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
public class ResidueProperties
{
- public static Hashtable scoreMatrices=new Hashtable();
+ public static Hashtable scoreMatrices = new Hashtable();
//Stores residue codes/names and colours and other things
- public static final int [] aaIndex; // aaHash version 2.1.1 and below
- public static final int [] nucleotideIndex;
+ public static final int[] aaIndex; // aaHash version 2.1.1 and below
+ public static final int[] nucleotideIndex;
public static final Hashtable aa3Hash = new Hashtable();
public static final Hashtable aa2Triplet = new Hashtable();
public static final Hashtable nucleotideName = new Hashtable();
-
static
{
aaIndex = new int[255];
- for(int i=0; i<255; i++)
+ for (int i = 0; i < 255; i++)
+ {
aaIndex[i] = 23;
+ }
aaIndex['A'] = 0;
aaIndex['R'] = 1;
{
nucleotideIndex = new int[255];
for (int i = 0; i < 255; i++)
+ {
nucleotideIndex[i] = -1;
+ }
nucleotideIndex['A'] = 0;
nucleotideIndex['a'] = 0;
nucleotideIndex['N'] = 9;
nucleotideIndex['n'] = 9;
-
nucleotideName.put("A", "Adenine");
nucleotideName.put("a", "Adenine");
nucleotideName.put("G", "Guanine");
nucleotideName.put("n", "Unknown");
}
-
static
{
aa3Hash.put("ALA", new Integer(0));
// 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("XAA", new Integer(22)); // X unknown
aa3Hash.put("-", new Integer(23));
aa3Hash.put("*", new Integer(23));
aa3Hash.put(".", new Integer(23));
/**
* register matrices in list
*/
- static {
- scoreMatrices.put("BLOSUM62", new ScoreMatrix("BLOSUM62",BLOSUM62, 0));
- scoreMatrices.put("PAM250", new ScoreMatrix("PAM250",PAM250, 0));
+ static
+ {
+ scoreMatrices.put("BLOSUM62", new ScoreMatrix("BLOSUM62", BLOSUM62, 0));
+ scoreMatrices.put("PAM250", new ScoreMatrix("PAM250", PAM250, 0));
scoreMatrices.put("DNA", new ScoreMatrix("DNA", DNA, 1));
}
+
public static final Color[] pidColours =
{
midBlue, new Color(153, 153, 255),
Phe.addElement("TTT");
}
-
//Stores residue codes/names and colours and other things
public static Hashtable propHash = new Hashtable();
public static Hashtable hydrophobic = new Hashtable();
return null;
}
- public static int[][] getDefaultPeptideMatrix() {
+ public static int[][] getDefaultPeptideMatrix()
+ {
return ResidueProperties.getBLOSUM62();
}
- public static int[][] getDefaultDnaMatrix() {
+
+ public static int[][] getDefaultDnaMatrix()
+ {
return ResidueProperties.getDNA();
}
* @param pwtype
* @return matrix in scoreMatrices with key pwtype or null
*/
- public static ScoreMatrix getScoreMatrix(String pwtype) {
- Object val=scoreMatrices.get(pwtype);
- if (val!=null)
+ public static ScoreMatrix getScoreMatrix(String pwtype)
+ {
+ Object val = scoreMatrices.get(pwtype);
+ if (val != null)
+ {
return (ScoreMatrix) val;
+ }
return null;
}
}