|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object edu.upenn.crimson.io.NexusFile
public class NexusFile
Functions related to loading NEXUS files.
Field Summary | |
---|---|
private static java.util.regex.Pattern |
needsQuotesPattern
From Mark Holder |
private static java.lang.String |
regexPat
|
private static java.util.regex.Pattern |
shortStrNeedsQuotePattern
From Mark Holder |
Constructor Summary | |
---|---|
NexusFile()
|
Method Summary | |
---|---|
static Tree |
append(java.lang.String filename,
java.lang.String treeID,
java.lang.String partitionID)
Appends a Nexus file into the current database. |
static java.lang.String |
doQuote(java.lang.String text)
From Mark Holder |
private static int |
findLabelEnd(java.lang.String newick,
int start)
Keep incrementing until we find the end of the number or label. |
static Tree |
load(java.lang.String filename,
java.lang.String treeID,
java.lang.String partitionID)
Loads a Nexus file. |
static Tree |
loadNewick(java.lang.String filename)
Loads a tree structure from a Nexus file into memory. |
private static boolean |
multiCharStringNeedsQuotes(java.lang.String text)
From Mark Holder |
static Tree |
parseNewick(Tree tree)
This might be faster if we use char[] instead of String for "newick". |
static Tree |
parseNewick(Tree tree,
java.lang.String newick)
This might be faster if we use char[] instead of String for "newick". |
static java.lang.String |
quote(java.lang.String text)
From Mark Holder This will properly quote a word that is to be included in a NEXUS file. |
static java.lang.String[] |
quote(java.lang.String[] text)
From Mark Holder This will properly quote a word that is to be included in a NEXUS file. |
private static boolean |
shortStringNeedsQuotes(java.lang.String text)
From Mark Holder handles strings of len 1 or 0 only. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private static final java.lang.String regexPat
private static final java.util.regex.Pattern needsQuotesPattern
private static final java.util.regex.Pattern shortStrNeedsQuotePattern
Constructor Detail |
---|
public NexusFile()
Method Detail |
---|
public static Tree loadNewick(java.lang.String filename)
private static int findLabelEnd(java.lang.String newick, int start)
public static Tree parseNewick(Tree tree)
public static Tree parseNewick(Tree tree, java.lang.String newick)
public static Tree load(java.lang.String filename, java.lang.String treeID, java.lang.String partitionID)
public static Tree append(java.lang.String filename, java.lang.String treeID, java.lang.String partitionID)
public static java.lang.String doQuote(java.lang.String text)
public static java.lang.String quote(java.lang.String text)
public static java.lang.String[] quote(java.lang.String[] text)
private static boolean multiCharStringNeedsQuotes(java.lang.String text)
private static boolean shortStringNeedsQuotes(java.lang.String text)
text
-
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |