git://source.jalview.org
/
jalview.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch 'bug/JAL-998_wrap-sequence-tooltip' into develop
[jalview.git]
/
src
/
jalview
/
schemes
/
ResidueProperties.java
diff --git
a/src/jalview/schemes/ResidueProperties.java
b/src/jalview/schemes/ResidueProperties.java
index
7ec9e1c
..
8acf1f2
100755
(executable)
--- a/
src/jalview/schemes/ResidueProperties.java
+++ b/
src/jalview/schemes/ResidueProperties.java
@@
-23,9
+23,13
@@
package jalview.schemes;
import jalview.analysis.scoremodels.PIDScoreModel;
import jalview.api.analysis.ScoreModelI;
import jalview.analysis.scoremodels.PIDScoreModel;
import jalview.api.analysis.ScoreModelI;
-import java.util.*;
+import java.awt.Color;
+import java.util.ArrayList;
+import java.util.Enumeration;
+import java.util.Hashtable;
import java.util.List;
import java.util.List;
-import java.awt.*;
+import java.util.Map;
+import java.util.Vector;
public class ResidueProperties
{
public class ResidueProperties
{
@@
-1451,7
+1455,7
@@
public class ResidueProperties
propMatrixF[i][j] = 0;
propMatrixPos[i][j] = 0;
propMatrixEpos[i][j] = 0;
propMatrixF[i][j] = 0;
propMatrixPos[i][j] = 0;
propMatrixEpos[i][j] = 0;
- for (Enumeration<String> en = (Enumeration<String>) propHash.keys(); en
+ for (Enumeration<String> en = propHash.keys(); en
.hasMoreElements();)
{
String ph = en.nextElement();
.hasMoreElements();)
{
String ph = en.nextElement();
@@
-1695,7
+1699,9
@@
public class ResidueProperties
* Used by getRNASecStrucState
*
*/
* 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>();
static
{
toRNAssState = new Hashtable<String, String>();
@@
-1759,7
+1765,15
@@
public class ResidueProperties
toRNAssState.put("y", "Y");
toRNAssState.put("Z", "Z");
toRNAssState.put("z", "Z");
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);
+ }
}
/**
}
/**
@@
-1780,7
+1794,8
@@
public class ResidueProperties
String ssc = ssstring.substring(i, i + 1);
if (toRNAssState.containsKey(ssc))
{
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
{
}
else
{
@@
-1790,6
+1805,11
@@
public class ResidueProperties
return ss.toString();
}
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)
// main method generates perl representation of residue property hash
// / cut here
public static void main(String[] args)
@@
-1839,4
+1859,5
@@
public class ResidueProperties
System.out.println("};");
}
// to here
System.out.println("};");
}
// to here
+
}
}