X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fschemes%2FResidueProperties.java;h=de9998738de741a461d189cb47334edd801c5dfe;hb=4d7f98a6dd54d9863ba449ec79dcd95d25ed863d;hp=ce838758fbe117ba0251a8e78504fd4d33a3a4cb;hpb=619cc880371f3228e6a1fb33c6bfb6e7a7e2622c;p=jalview.git diff --git a/src/jalview/schemes/ResidueProperties.java b/src/jalview/schemes/ResidueProperties.java index ce83875..de99987 100755 --- a/src/jalview/schemes/ResidueProperties.java +++ b/src/jalview/schemes/ResidueProperties.java @@ -298,9 +298,9 @@ public class ResidueProperties aa2Triplet.put("v", "VAL"); } - public static final String[] aa = - { "A", "R", "N", "D", "C", "Q", "E", "G", "H", "I", "L", "K", "M", "F", - "P", "S", "T", "W", "Y", "V", "B", "Z", "X", "_", "*", ".", " " }; + public static final String[] aa = { "A", "R", "N", "D", "C", "Q", "E", + "G", "H", "I", "L", "K", "M", "F", "P", "S", "T", "W", "Y", "V", "B", + "Z", "X", "_", "*", ".", " " }; public static final Color midBlue = new Color(100, 100, 255); @@ -320,8 +320,8 @@ public class ResidueProperties scaleColours.addElement(Color.white); } - public static final Color[] taylor = - { new Color(204, 255, 0), // A Greenish-yellowy-yellow + public static final Color[] taylor = { new Color(204, 255, 0), // A + // Greenish-yellowy-yellow new Color(0, 0, 255), // R Blueish-bluey-blue new Color(204, 0, 255), // N Blueish-reddy-blue new Color(255, 0, 0), // D Reddish-reddy-red @@ -349,8 +349,7 @@ public class ResidueProperties Color.white // . }; - public static final Color[] nucleotide = - { new Color(100, 247, 63), // A + public static final Color[] nucleotide = { new Color(100, 247, 63), // A new Color(255, 179, 64), // C new Color(235, 65, 60), // G new Color(60, 136, 238), // T @@ -364,16 +363,15 @@ public class ResidueProperties }; // Added for PurinePyrimidineColourScheme - public static final Color[] purinepyrimidine = - { new Color(255, 131, 250), // A, G, R purines purplish/orchid + public static final Color[] purinepyrimidine = { + new Color(255, 131, 250), // A, G, R purines purplish/orchid new Color(64, 224, 208), // C,U, T, Y pyrimidines turquoise Color.white, // all other nucleotides Color.white // Gap }; // Zappo - public static final Color[] zappo = - { Color.pink, // A + public static final Color[] zappo = { Color.pink, // A midBlue, // R Color.green, // N Color.red, // D @@ -403,8 +401,7 @@ public class ResidueProperties }; // Dunno where I got these numbers from - public static final double[] hyd2 = - { 0.62, // A + public static final double[] hyd2 = { 0.62, // A 0.29, // R -0.90, // N -0.74, // D @@ -429,34 +426,33 @@ public class ResidueProperties 0.0 // X }; - public static final double[] helix = - { 1.42, 0.98, 0.67, 1.01, 0.70, 1.11, 1.51, 0.57, 1.00, 1.08, 1.21, 1.16, - 1.45, 1.13, 0.57, 0.77, 0.83, 1.08, 0.69, 1.06, 0.84, 1.31, 1.00, 0.0 }; + public static final double[] helix = { 1.42, 0.98, 0.67, 1.01, 0.70, + 1.11, 1.51, 0.57, 1.00, 1.08, 1.21, 1.16, 1.45, 1.13, 0.57, 0.77, + 0.83, 1.08, 0.69, 1.06, 0.84, 1.31, 1.00, 0.0 }; public static final double helixmin = 0.57; public static final double helixmax = 1.51; - public static final double[] strand = - { 0.83, 0.93, 0.89, 0.54, 1.19, 1.10, 0.37, 0.75, 0.87, 1.60, 1.30, 0.74, - 1.05, 1.38, 0.55, 0.75, 1.19, 1.37, 1.47, 1.70, 0.72, 0.74, 1.0, 0.0 }; + public static final double[] strand = { 0.83, 0.93, 0.89, 0.54, 1.19, + 1.10, 0.37, 0.75, 0.87, 1.60, 1.30, 0.74, 1.05, 1.38, 0.55, 0.75, + 1.19, 1.37, 1.47, 1.70, 0.72, 0.74, 1.0, 0.0 }; public static final double strandmin = 0.37; public static final double strandmax = 1.7; - public static final double[] turn = - { 0.66, 0.95, 1.56, 1.46, 1.19, 0.98, 0.74, 1.56, 0.95, 0.47, 0.59, 1.01, - 0.60, 0.60, 1.52, 1.43, 0.96, 0.96, 1.14, 0.50, 1.51, 0.86, 1.00, 0, - 0 }; + public static final double[] turn = { 0.66, 0.95, 1.56, 1.46, 1.19, 0.98, + 0.74, 1.56, 0.95, 0.47, 0.59, 1.01, 0.60, 0.60, 1.52, 1.43, 0.96, + 0.96, 1.14, 0.50, 1.51, 0.86, 1.00, 0, 0 }; public static final double turnmin = 0.47; public static final double turnmax = 1.56; - public static final double[] buried = - { 1.7, 0.1, 0.4, 0.4, 4.6, 0.3, 0.3, 1.8, 0.8, 3.1, 2.4, 0.05, 1.9, 2.2, - 0.6, 0.8, 0.7, 1.6, 0.5, 2.9, 0.4, 0.3, 1.358, 0.00 }; + public static final double[] buried = { 1.7, 0.1, 0.4, 0.4, 4.6, 0.3, + 0.3, 1.8, 0.8, 3.1, 2.4, 0.05, 1.9, 2.2, 0.6, 0.8, 0.7, 1.6, 0.5, + 2.9, 0.4, 0.3, 1.358, 0.00 }; public static final double buriedmin = 0.05; @@ -465,9 +461,9 @@ public class ResidueProperties // This is hydropathy index // Kyte, J., and Doolittle, R.F., J. Mol. Biol. // 1157, 105-132, 1982 - public static final double[] hyd = - { 1.8, -4.5, -3.5, -3.5, 2.5, -3.5, -3.5, -0.4, -3.2, 4.5, 3.8, -3.9, - 1.9, 2.8, -1.6, -0.8, -0.7, -0.9, -1.3, 4.2, -3.5, -3.5, -0.49, 0.0 }; + public static final double[] hyd = { 1.8, -4.5, -3.5, -3.5, 2.5, -3.5, + -3.5, -0.4, -3.2, 4.5, 3.8, -3.9, 1.9, 2.8, -1.6, -0.8, -0.7, -0.9, + -1.3, 4.2, -3.5, -3.5, -0.49, 0.0 }; public static final double hydmax = 4.5; @@ -475,8 +471,7 @@ public class ResidueProperties // public static final double hydmax = 1.38; // public static final double hydmin = -2.53; - private static final int[][] BLOSUM62 = - { + private static final int[][] BLOSUM62 = { { 4, -1, -2, -2, 0, -1, -1, 0, -2, -1, -1, -1, -1, -2, -1, 1, 0, -3, -2, 0, -2, -1, 0, -4 }, { -1, 5, 0, -2, -3, 1, 0, -2, 0, -3, -2, 2, -1, -3, -2, -1, -1, -3, @@ -526,8 +521,7 @@ public class ResidueProperties { -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, 1 }, }; - static final int[][] PAM250 = - { + static final int[][] PAM250 = { { 2, -2, 0, 0, -2, 0, 0, 1, -1, -1, -2, -1, -1, -3, 1, 1, 1, -6, -3, 0, 0, 0, 0, -8 }, { -2, 6, 0, -1, -4, 1, -1, -3, 2, -2, -3, 3, 0, -4, 0, 0, -1, 2, -4, @@ -603,9 +597,7 @@ public class ResidueProperties // treats T and U identically. R and Y weak equivalence with AG and CTU. // N matches any other base weakly // - static final int[][] DNA = - { - { 10, -8, -8, -8, -8, 1, 1, 1, -8, 1, 1 }, // A + static final int[][] DNA = { { 10, -8, -8, -8, -8, 1, 1, 1, -8, 1, 1 }, // A { -8, 10, -8, -8, -8, 1, 1, -8, 1, 1, 1 }, // C { -8, -8, 10, -8, -8, 1, 1, 1, -8, 1, 1 }, // G { -8, -8, -8, 10, 10, 1, 1, -8, 1, 1, 1 }, // T @@ -628,13 +620,12 @@ public class ResidueProperties } - public static final Color[] pidColours = - { midBlue, new Color(153, 153, 255), + public static final Color[] pidColours = { midBlue, + new Color(153, 153, 255), // Color.lightGray, new Color(204, 204, 255), }; - public static final float[] pidThresholds = - { 80, 60, 40, }; + public static final float[] pidThresholds = { 80, 60, 40, }; public static Map> codonHash = new HashMap>(); @@ -728,28 +719,17 @@ public class ResidueProperties /* * Ambiguity codes as per http://www.chem.qmul.ac.uk/iubmb/misc/naseq.html */ - ambiguityCodes.put("R", new String[] - { "A", "G" }); - ambiguityCodes.put("Y", new String[] - { "T", "C" }); - ambiguityCodes.put("W", new String[] - { "A", "T" }); - ambiguityCodes.put("S", new String[] - { "G", "C" }); - ambiguityCodes.put("M", new String[] - { "A", "C" }); - ambiguityCodes.put("K", new String[] - { "G", "T" }); - ambiguityCodes.put("H", new String[] - { "A", "T", "C" }); - ambiguityCodes.put("B", new String[] - { "G", "T", "C" }); - ambiguityCodes.put("V", new String[] - { "G", "A", "C" }); - ambiguityCodes.put("D", new String[] - { "G", "A", "T" }); - ambiguityCodes.put("N", new String[] - { "G", "A", "T", "C" }); + ambiguityCodes.put("R", new String[] { "A", "G" }); + ambiguityCodes.put("Y", new String[] { "T", "C" }); + ambiguityCodes.put("W", new String[] { "A", "T" }); + ambiguityCodes.put("S", new String[] { "G", "C" }); + ambiguityCodes.put("M", new String[] { "A", "C" }); + ambiguityCodes.put("K", new String[] { "G", "T" }); + ambiguityCodes.put("H", new String[] { "A", "T", "C" }); + ambiguityCodes.put("B", new String[] { "G", "T", "C" }); + ambiguityCodes.put("V", new String[] { "G", "A", "C" }); + ambiguityCodes.put("D", new String[] { "G", "A", "T" }); + ambiguityCodes.put("N", new String[] { "G", "A", "T", "C" }); // Now build codon translation table codonHash2.put("AAA", "K"); @@ -888,8 +868,7 @@ public class ResidueProperties } else { - acodon[i] = new String[] - {}; + acodon[i] = new String[] {}; } } // enumerate all combinations and test for veracity of translation @@ -911,8 +890,7 @@ public class ResidueProperties if (acodon[ipos].length == 0 || tpos[ipos] < 0) { _acodon += codon.charAt(ipos); - allres[ipos] = new char[] - { codon.charAt(ipos) }; + allres[ipos] = new char[] { codon.charAt(ipos) }; } else { @@ -1389,8 +1367,7 @@ public class ResidueProperties propMatrixF[i][j] = 0; propMatrixPos[i][j] = 0; propMatrixEpos[i][j] = 0; - for (Enumeration en = propHash.keys(); en - .hasMoreElements();) + for (Enumeration en = propHash.keys(); en.hasMoreElements();) { String ph = en.nextElement(); Map pph = (Map) propHash @@ -1808,6 +1785,7 @@ public class ResidueProperties } System.out.println("};"); } + // to here /** @@ -1836,7 +1814,9 @@ public class ResidueProperties result.add(nuc); } } - } else { + } + else + { /* * Peptide */