X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fschemes%2FResidueProperties.java;h=9ac87ab231940b27ce6f3c89f95ef7bb48a01878;hb=4dd6a7731413d5fc38e2eda95548085bb07e7baf;hp=62d8d9248e98ff9ccfc7c9adf94bbcd215157bbe;hpb=7bc226b58110fa26d9dbd3f0c78095d06909ffc3;p=jalview.git diff --git a/src/jalview/schemes/ResidueProperties.java b/src/jalview/schemes/ResidueProperties.java index 62d8d92..9ac87ab 100755 --- a/src/jalview/schemes/ResidueProperties.java +++ b/src/jalview/schemes/ResidueProperties.java @@ -87,7 +87,7 @@ public class ResidueProperties aaIndex['b'] = 20; aaIndex['z'] = 21; aaIndex['x'] = 22; - aaIndex['u'] = 22; + aaIndex['u'] = 22; // TODO: selenocystine triplet and codons needed. also extend subt. matrices } static @@ -1167,12 +1167,7 @@ public class ResidueProperties 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) @@ -1246,4 +1241,52 @@ public class ResidueProperties } 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