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
JAL-4366 allow a 3di alignment to be loaded and shown as a split frame with existing...
[jalview.git]
/
src
/
jalview
/
analysis
/
Rna.java
diff --git
a/src/jalview/analysis/Rna.java
b/src/jalview/analysis/Rna.java
index
34233f0
..
0157b91
100644
(file)
--- a/
src/jalview/analysis/Rna.java
+++ b/
src/jalview/analysis/Rna.java
@@
-49,7
+49,8
@@
public class Rna
*/
public static boolean isOpeningParenthesis(char c)
{
*/
public static boolean isOpeningParenthesis(char c)
{
- return ('A' <= c && c <= 'Z' || c == '(' || c == '[' || c == '{' || c == '<');
+ return ('A' <= c && c <= 'Z' || c == '(' || c == '[' || c == '{'
+ || c == '<');
}
/**
}
/**
@@
-74,7
+75,8
@@
public class Rna
*/
public static boolean isClosingParenthesis(char c)
{
*/
public static boolean isClosingParenthesis(char c)
{
- return ('a' <= c && c <= 'z' || c == ')' || c == ']' || c == '}' || c == '>');
+ return ('a' <= c && c <= 'z' || c == ')' || c == ']' || c == '}'
+ || c == '>');
}
/**
}
/**
@@
-160,8
+162,8
@@
public class Rna
if (!stacks.containsKey(opening))
{
throw new WUSSParseException(MessageManager.formatMessage(
if (!stacks.containsKey(opening))
{
throw new WUSSParseException(MessageManager.formatMessage(
- "exception.mismatched_unseen_closing_char",
- new String[] { String.valueOf(base) }), i);
+ "exception.mismatched_unseen_closing_char", new String[]
+ { String.valueOf(base) }), i);
}
Stack<Integer> stack = stacks.get(opening);
}
Stack<Integer> stack = stacks.get(opening);
@@
-169,8
+171,8
@@
public class Rna
{
// error whilst parsing i'th position. pass back
throw new WUSSParseException(MessageManager.formatMessage(
{
// error whilst parsing i'th position. pass back
throw new WUSSParseException(MessageManager.formatMessage(
- "exception.mismatched_closing_char",
- new String[] { String.valueOf(base) }), i);
+ "exception.mismatched_closing_char", new String[]
+ { String.valueOf(base) }), i);
}
int temp = stack.pop();
}
int temp = stack.pop();
@@
-188,18
+190,14
@@
public class Rna
* i (length of input string)
*/
throw new WUSSParseException(MessageManager.formatMessage(
* i (length of input string)
*/
throw new WUSSParseException(MessageManager.formatMessage(
- "exception.mismatched_opening_char",
- new String[] { String.valueOf(opening),
- String.valueOf(stack.pop()) }), i);
+ "exception.mismatched_opening_char", new String[]
+ { String.valueOf(opening), String.valueOf(stack.pop()) }),
+ i);
}
}
return pairs;
}
}
}
return pairs;
}
-
-
-
-
/**
* Function to get the end position corresponding to a given start position
*
/**
* Function to get the end position corresponding to a given start position
*
@@
-423,8
+421,9
@@
public class Rna
final int open = basePair.getBP5();
final int close = basePair.getBP3();
final int open = basePair.getBP5();
final int close = basePair.getBP3();
- // System.out.println("open " + open + " close " + close);
- // System.out.println("lastclose " + lastclose + " lastopen " + lastopen);
+ // jalview.bin.Console.outPrintln("open " + open + " close " + close);
+ // jalview.bin.Console.outPrintln("lastclose " + lastclose + " lastopen "
+ // + lastopen);
// we're moving from right to left based on closing pair
/*
// we're moving from right to left based on closing pair
/*
@@
-438,12
+437,13
@@
public class Rna
/*
* catch things like <<..<<..>>..<<..>>>> |
*/
/*
* catch things like <<..<<..>>..<<..>>>> |
*/
- int j = bps.size() - 1;
- while (j >= 0)
+ int j = bps.size();
+ while (--j >= 0)
{
int popen = bps.get(j).getBP5();
{
int popen = bps.get(j).getBP5();
- // System.out.println("j " + j + " popen " + popen + " lastopen "
+ // jalview.bin.Console.outPrintln("j " + j + " popen " + popen + "
+ // lastopen "
// +lastopen + " open " + open);
if ((popen < lastopen) && (popen > open))
{
// +lastopen + " open " + open);
if ((popen < lastopen) && (popen > open))
{
@@
-458,7
+458,6
@@
public class Rna
break;
}
}
break;
}
}
- j -= 1;
}
// Put positions and helix information into the hashtable
}
// Put positions and helix information into the hashtable
@@
-466,7
+465,7
@@
public class Rna
helices.put(close, helix);
// Record helix as featuregroup
helices.put(close, helix);
// Record helix as featuregroup
- result.add(new SequenceFeature("RNA helix", "", "", open, close,
+ result.add(new SequenceFeature("RNA helix", "", open, close,
String.valueOf(helix)));
lastopen = open;
String.valueOf(helix)));
lastopen = open;