/*
- * 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.7)
+ * Copyright (C) 2011 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 <http://www.gnu.org/licenses/>.
*/
package jalview.schemes;
aaIndex['z'] = 21;
aaIndex['x'] = 22;
aaIndex['u'] = 22; // TODO: selenocystine triplet and codons needed. also
- // extend subt. matrices
+ // extend subt. matrices
}
static
nucleotideIndex = new int[255];
for (int i = 0; i < 255; i++)
{
- nucleotideIndex[i] = -1;
+ nucleotideIndex[i] = 10; // non-nucleotide symbols are all non-gap gaps.
}
nucleotideIndex['A'] = 0;
new Color(255, 179, 64), // C
new Color(235, 65, 60), // G
new Color(60, 136, 238), // T
- new Color(60, 136, 238) // U
+ new Color(60, 136, 238), // U
+ Color.white, // I
+ Color.white, // X
+ Color.white, // R
+ Color.white, // Y
+ Color.white, // N
+ Color.white, // Gap
};
// Zappo
-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
{
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
+ */
static final int[][] DNA =
{
- { 5, -4, -4, -4, 1 }, // C
- { -4, 5, -4, -4, 1 }, // T
- { -4, -4, 5, -4, 1 }, // A
- { -4, -4, -4, 5, 1 }, // G
- { 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
public static final Color[] pidColours =
{ midBlue, new Color(153, 153, 255),
- // Color.lightGray,
+ // Color.lightGray,
new Color(204, 204, 255), };
public static final float[] pidThresholds =
charged.put("E", new Integer(1));
charged.put("Q", new Integer(0));
charged.put("D", new Integer(1));
- charged.put("N", 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("S", new Integer(0));
charged.put("T", new Integer(0));
charged.put("P", new Integer(0));
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";
}