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
TreePanel takes viewport
[jalview.git]
/
src
/
jalview
/
io
/
MSFfile.java
diff --git
a/src/jalview/io/MSFfile.java
b/src/jalview/io/MSFfile.java
index
5f81215
..
0475542
100755
(executable)
--- a/
src/jalview/io/MSFfile.java
+++ b/
src/jalview/io/MSFfile.java
@@
-35,10
+35,7
@@
import java.util.*;
*/
\r
public class MSFfile extends AlignFile
\r
{
\r
*/
\r
public class MSFfile extends AlignFile
\r
{
\r
- private static com.stevesoft.pat.Regex gapre = new com.stevesoft.pat.Regex("\\~",
\r
- "-");
\r
- private static com.stevesoft.pat.Regex re2gap = new com.stevesoft.pat.Regex(
\r
- "[" + jalview.util.Comparison.GapChars + "]", "\\~");
\r
+
\r
\r
/**
\r
* Creates a new MSFfile object.
\r
\r
/**
\r
* Creates a new MSFfile object.
\r
@@
-75,6
+72,9
@@
public class MSFfile extends AlignFile
*/
\r
public void parse()
\r
{
\r
*/
\r
public void parse()
\r
{
\r
+ com.stevesoft.pat.Regex gapre = new com.stevesoft.pat.Regex("\\~",
\r
+ "-");
\r
+
\r
int i = 0;
\r
boolean seqFlag = false;
\r
String key = new String();
\r
int i = 0;
\r
boolean seqFlag = false;
\r
String key = new String();
\r
@@
-151,7
+151,7
@@
public class MSFfile extends AlignFile
String seq = seqhash.get(head).toString();
\r
\r
int start = 1;
\r
String seq = seqhash.get(head).toString();
\r
\r
int start = 1;
\r
- int end = seq.length();
\r
+ int end = -1;
\r
\r
if (maxLength < head.length())
\r
{
\r
\r
if (maxLength < head.length())
\r
{
\r
@@
-177,6
+177,7
@@
public class MSFfile extends AlignFile
}
\r
}
\r
\r
}
\r
}
\r
\r
+
\r
// Replace ~ with a sensible gap character
\r
seq = gapre.replaceAll(seq);
\r
\r
// Replace ~ with a sensible gap character
\r
seq = gapre.replaceAll(seq);
\r
\r
@@
-251,6
+252,9
@@
public class MSFfile extends AlignFile
*/
\r
public static String print(SequenceI[] s, boolean is_NA)
\r
{
\r
*/
\r
public static String print(SequenceI[] s, boolean is_NA)
\r
{
\r
+ com.stevesoft.pat.Regex re2gap = new com.stevesoft.pat.Regex(
\r
+ "[" + jalview.util.Comparison.GapChars + "]", "\\~");
\r
+
\r
StringBuffer out = new StringBuffer("!!" + (is_NA ? "NA" : "AA") +
\r
"_MULTIPLE_ALIGNMENT 1.0\n\n"); // TODO: JBPNote : Jalview doesn't remember NA or AA yet.
\r
\r
StringBuffer out = new StringBuffer("!!" + (is_NA ? "NA" : "AA") +
\r
"_MULTIPLE_ALIGNMENT 1.0\n\n"); // TODO: JBPNote : Jalview doesn't remember NA or AA yet.
\r
\r