X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fschemes%2FResidueProperties.java;h=67211cd5434f6a32dc8bb93f4610c7a74a855256;hb=153dd62dc91da13ae732600e6ea55ddbe15eab39;hp=48a9272fe3c641c524b6cee28edff8e463436aff;hpb=dd645839efa022cd15c6247398692412b7c2ceaa;p=jalview.git diff --git a/src/jalview/schemes/ResidueProperties.java b/src/jalview/schemes/ResidueProperties.java index 48a9272..67211cd 100755 --- a/src/jalview/schemes/ResidueProperties.java +++ b/src/jalview/schemes/ResidueProperties.java @@ -1,20 +1,19 @@ /* - * Jalview - A Sequence Alignment Editor and Viewer (Development Version 2.4.1) - * Copyright (C) 2009 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle + * Jalview - A Sequence Alignment Editor and Viewer (Version 2.6) + * Copyright (C) 2010 J Procter, AM Waterhouse, 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 - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. + * This file is part of Jalview. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * Jalview is free software: you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + * Jalview is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty + * of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along with Jalview. If not, see . */ package jalview.schemes; @@ -93,7 +92,7 @@ public class ResidueProperties aaIndex['z'] = 21; aaIndex['x'] = 22; aaIndex['u'] = 22; // TODO: selenocystine triplet and codons needed. also - // extend subt. matrices + // extend subt. matrices } static @@ -281,12 +280,12 @@ public class ResidueProperties new Color(235, 65, 60), // G new Color(60, 136, 238), // T new Color(60, 136, 238), // U - Color.white, // I - Color.white, // X - Color.white, // R - Color.white, // Y - Color.white, // N - Color.white, // Gap + Color.white, // I + Color.white, // X + Color.white, // R + Color.white, // Y + Color.white, // N + Color.white, // Gap }; // Zappo @@ -496,7 +495,7 @@ public class ResidueProperties -8, -8, -8, -8, -8, -8, 1 }, }; public static final Hashtable ssHash = new Hashtable(); // stores the number - // value of the aa + // value of the aa static { @@ -510,27 +509,24 @@ public class ResidueProperties ssHash.put("I", Color.pink); ssHash.put("B", Color.yellow); } -/* new Color(60, 136, 238), // U - Color.white, // I - Color.white, // X - Color.white, // R - Color.white, // Y - Color.white, // N - Color.white, // Gap -*/ + + /* + * new Color(60, 136, 238), // U Color.white, // I Color.white, // X + * Color.white, // R Color.white, // Y Color.white, // N Color.white, // Gap + */ static final int[][] DNA = { - { 10, -8, -8, -8, 1, 0 ,0 ,0 ,0 ,0 ,1 }, // C - { -8, 10, -8, -8, 1, 0 ,0 ,0 ,0 ,0 ,1 }, // T - { -8, -8, 10, -8, 1, 0 ,0 ,0 ,0 ,0 ,1 }, // A - { -8, -8, -8, 10, 1, 0 ,0 ,0 ,0 ,0 ,1 }, // G - { 1, 1, 1, 1, 10,0 ,0 ,0 ,0 ,0 ,1 }, // - - { 1, 1, 1, 1, 1 ,10 ,0 ,0 ,0 ,0 ,1 }, // - - { 1, 1, 1, 1, 1 ,0 ,10 ,0 ,0 ,0 ,1 }, // - - { 1, 1, 1, 1, 1 ,0 ,0 ,10 ,0 ,0 ,1 }, // - - { 1, 1, 1, 1, 1 ,0 ,0 ,0 ,10 ,0 ,1 }, // - - { 1, 1, 1, 1, 1 ,0 ,0 ,0 ,0 ,10 ,1 }, // - - { 1, 1, 1, 1, 1 ,1 ,1 ,1 ,1 ,1 ,1 }, // - + { 10, -8, -8, -8, 1, 0, 0, 0, 0, 0, 1 }, // C + { -8, 10, -8, -8, 1, 0, 0, 0, 0, 0, 1 }, // T + { -8, -8, 10, -8, 1, 0, 0, 0, 0, 0, 1 }, // A + { -8, -8, -8, 10, 1, 0, 0, 0, 0, 0, 1 }, // G + { 1, 1, 1, 1, 10, 0, 0, 0, 0, 0, 1 }, // - + { 1, 1, 1, 1, 1, 10, 0, 0, 0, 0, 1 }, // - + { 1, 1, 1, 1, 1, 0, 10, 0, 0, 0, 1 }, // - + { 1, 1, 1, 1, 1, 0, 0, 10, 0, 0, 1 }, // - + { 1, 1, 1, 1, 1, 0, 0, 0, 10, 0, 1 }, // - + { 1, 1, 1, 1, 1, 0, 0, 0, 0, 10, 1 }, // - + { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 }, // - }; /** * register matrices in list @@ -964,7 +960,9 @@ public class ResidueProperties charged.put("E", new Integer(1)); charged.put("Q", new Integer(0)); charged.put("D", new Integer(1)); - charged.put("N", new Integer(0)); // Asparagine is polar but not charged. Alternative would be charged and negative (in basic form)? + charged.put("N", new Integer(0)); // Asparagine is polar but not charged. + // Alternative would be charged and + // negative (in basic form)? charged.put("S", new Integer(0)); charged.put("T", new Integer(0)); charged.put("P", new Integer(0)); @@ -1159,9 +1157,9 @@ public class ResidueProperties public static String codonTranslate(String lccodon) { - String codon=lccodon.toUpperCase(); + String codon = lccodon.toUpperCase(); // all base ambiguity codes yield an 'X' amino acid residue - if (codon.indexOf('X')>-1 || codon.indexOf('N')>-1) + if (codon.indexOf('X') > -1 || codon.indexOf('N') > -1) { return "X"; }