From 2eba9feec314ba7288bbbcb3b29fbe7f15f16e15 Mon Sep 17 00:00:00 2001 From: jprocter Date: Mon, 30 Apr 2007 13:14:17 +0000 Subject: [PATCH] dssp 7-state to three state lookup --- src/jalview/schemes/ResidueProperties.java | 38 ++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) diff --git a/src/jalview/schemes/ResidueProperties.java b/src/jalview/schemes/ResidueProperties.java index b14d9c6..9ac87ab 100755 --- a/src/jalview/schemes/ResidueProperties.java +++ b/src/jalview/schemes/ResidueProperties.java @@ -1251,4 +1251,42 @@ public class ResidueProperties 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