*/
package jalview.schemes;
+import jalview.analysis.scoremodels.FeatureScoreModel;
import jalview.analysis.scoremodels.PIDScoreModel;
import jalview.api.analysis.ScoreModelI;
import java.awt.Color;
import java.util.ArrayList;
import java.util.Enumeration;
+import java.util.HashMap;
import java.util.Hashtable;
import java.util.List;
import java.util.Map;
public static final int[] purinepyrimidineIndex;
- public static final Hashtable aa3Hash = new Hashtable();
+ public static final Map<String, Integer> aa3Hash = new HashMap<String, Integer>();
- public static final Hashtable aa2Triplet = new Hashtable();
+ public static final Map<String, String> aa2Triplet = new HashMap<String, String>();
- public static final Hashtable nucleotideName = new Hashtable();
+ public static final Map<String, String> nucleotideName = new HashMap<String, String>();
static
{
public static Vector STOP = new Vector();
+ public static String START = "ATG";
+
static
{
codonHash.put("K", Lys);
// scoreMatrices.put("Conservation EnhPos", new
// ScoreMatrix("Conservation EnhPos",propMatrixEpos,0));
scoreMatrices.put("PID", new PIDScoreModel());
+ scoreMatrices.put("Displayed Features", new FeatureScoreModel());
}
private ResidueProperties()
return hyd;
}
- public static Hashtable getAA3Hash()
+ public static Map<String, Integer> getAA3Hash()
{
return aa3Hash;
}
* Used by getRNASecStrucState
*
*/
- public static Hashtable toRNAssState;
+ public static Hashtable<String, String> toRNAssState;
+
+ public static boolean RNAcloseParen[] = new boolean[255];
static
{
toRNAssState = new Hashtable<String, String>();
toRNAssState.put("y", "Y");
toRNAssState.put("Z", "Z");
toRNAssState.put("z", "Z");
-
+ for (int p = 0; p < RNAcloseParen.length; p++)
+ {
+ RNAcloseParen[p] = false;
+ }
+ for (String k : toRNAssState.keySet())
+ {
+ RNAcloseParen[k.charAt(0)] = k.charAt(0) != toRNAssState.get(k)
+ .charAt(0);
+ }
}
/**
String ssc = ssstring.substring(i, i + 1);
if (toRNAssState.containsKey(ssc))
{
- ss.append((String) toRNAssState.get(ssc));
+ // valid ss character - so return it
+ ss.append(ssc); // (String) toRNAssState.get(ssc));
}
else
{
return ss.toString();
}
+ public static boolean isCloseParenRNA(char dc)
+ {
+ return RNAcloseParen[dc];
+ }
+
// main method generates perl representation of residue property hash
// / cut here
public static void main(String[] args)