public static int getPAM250(String A1, String A2)
{
- int a = aaIndex[A1.charAt(0)];
- int b = aaIndex[A2.charAt(0)];
-
- int pog = ResidueProperties.PAM250[a][b];
-
- return pog;
+ return getPAM250(A1.charAt(0), A2.charAt(0));
}
public static int getBLOSUM62(char c1, char c2)
}
return null;
}
+
+ public static int getPAM250(char c, char d)
+ {
+ int a = aaIndex[c];
+ int b = aaIndex[d];
+
+ int pog = ResidueProperties.PAM250[a][b];
+
+ return pog;
+ }
+
+ public static Hashtable toDssp3State;
+ static {
+ toDssp3State = new Hashtable();
+ toDssp3State.put("H", "H");
+ toDssp3State.put("E", "E");
+ toDssp3State.put("C", " ");
+ toDssp3State.put(" ", " ");
+ toDssp3State.put("T", " ");
+ toDssp3State.put("B", "E");
+ toDssp3State.put("G", "H");
+ toDssp3State.put("I", "H");
+ toDssp3State.put("X", " ");
+ }
+ /**
+ * translate from other dssp secondary structure alphabets to 3-state
+ * @param ssstring
+ * @return ssstring as a three-state secondary structure assignment.
+ */
+ public static String getDssp3state(String ssstring)
+ {
+ if (ssstring==null)
+ {
+ return null;
+ }
+ StringBuffer ss = new StringBuffer();
+ for (int i=0; i<ssstring.length(); i++)
+ {
+ String ssc = ssstring.substring(i, i+1);
+ if (toDssp3State.containsKey(ssc))
+ {
+ ss.append((String) toDssp3State.get(ssc));
+ } else {
+ ss.append(" ");
+ }
+ }
+ return ss.toString();
+ }
}