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 'develop' into releases/Release_2_11_3_Branch
[jalview.git]
/
src
/
jalview
/
io
/
NewickFile.java
diff --git
a/src/jalview/io/NewickFile.java
b/src/jalview/io/NewickFile.java
index
269ffb3
..
b3c0011
100755
(executable)
--- a/
src/jalview/io/NewickFile.java
+++ b/
src/jalview/io/NewickFile.java
@@
-26,20
+26,20
@@
// TODO: Extended SequenceNodeI to hold parsed NHX strings
package jalview.io;
// TODO: Extended SequenceNodeI to hold parsed NHX strings
package jalview.io;
-import java.util.Locale;
-
-import jalview.datamodel.BinaryNode;
-import jalview.datamodel.SequenceNode;
-import jalview.util.MessageManager;
-
import java.io.BufferedReader;
import java.io.File;
import java.io.FileReader;
import java.io.IOException;
import java.io.BufferedReader;
import java.io.File;
import java.io.FileReader;
import java.io.IOException;
+import java.util.Locale;
import java.util.StringTokenizer;
import com.stevesoft.pat.Regex;
import java.util.StringTokenizer;
import com.stevesoft.pat.Regex;
+import jalview.bin.Jalview;
+import jalview.datamodel.BinaryNode;
+import jalview.datamodel.SequenceNode;
+import jalview.util.MessageManager;
+
/**
* Parse a new hanpshire style tree Caveats: NHX files are NOT supported and the
* tree distances and topology are unreliable when they are parsed. TODO: on
/**
* Parse a new hanpshire style tree Caveats: NHX files are NOT supported and the
* tree distances and topology are unreliable when they are parsed. TODO: on
@@
-488,7
+488,8
@@
public class NewickFile extends FileParse
{
try
{
{
try
{
- distance = (Double.valueOf(ndist.stringMatched(1))).floatValue();
+ distance = (Double.valueOf(ndist.stringMatched(1)))
+ .floatValue();
HasDistances = true;
nodehasdistance = true;
} catch (Exception e)
HasDistances = true;
nodehasdistance = true;
} catch (Exception e)
@@
-877,20
+878,20
@@
public class NewickFile extends FileParse
{
if (root.isDummy())
{
{
if (root.isDummy())
{
- _print(tf, root.right());
- _print(tf, root.left());
+ _print(tf, root.right());
+ _print(tf, root.left());
}
else
{
tf.append("(");
}
else
{
tf.append("(");
- _print(tf, root.right());
+ _print(tf, root.right());
if (root.left() != null)
{
tf.append(",");
}
if (root.left() != null)
{
tf.append(",");
}
- _print(tf, root.left());
+ _print(tf, root.left());
tf.append(")" + printRootField(root));
}
}
tf.append(")" + printRootField(root));
}
}
@@
-910,24
+911,24
@@
public class NewickFile extends FileParse
{
if (c.isDummy())
{
{
if (c.isDummy())
{
- _print(tf, c.left());
+ _print(tf, c.left());
if (c.left() != null)
{
tf.append(",");
}
if (c.left() != null)
{
tf.append(",");
}
- _print(tf, c.right());
+ _print(tf, c.right());
}
else
{
tf.append("(");
}
else
{
tf.append("(");
- _print(tf, c.right());
+ _print(tf, c.right());
if (c.left() != null)
{
tf.append(",");
}
if (c.left() != null)
{
tf.append(",");
}
- _print(tf, c.left());
+ _print(tf, c.left());
tf.append(")" + printNodeField(c));
}
}
tf.append(")" + printNodeField(c));
}
}
@@
-945,9
+946,8
@@
public class NewickFile extends FileParse
{
if (args == null || args.length != 1)
{
{
if (args == null || args.length != 1)
{
- System.err.println(
- "Takes one argument - file name of a newick tree file.");
- System.exit(0);
+ Jalview.exit(
+ "Takes one argument - file name of a newick tree file.", 0);
}
File fn = new File(args[0]);
}
File fn = new File(args[0]);