|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectedu.rit.compbio.phyl.DrawTree
public class DrawTree
Class DrawTree is a program that draws a phylogenetic tree. The tree is specified on the command line in a subset of Newick Standard format. The drawing is stored in a file specified on the command line as a serialized Drawing object. The View program can be used to view the drawing file and save it in an image file in several formats.
Usage: java edu.rit.compbio.phyl.DrawTree "tree" file [
format ]
tree = Tree in Newick Standard format
file = Drawing file name
format = DecimalFormat string for branch lengths (default:
"0.00")
Newick Standard format. The subset of Newick Standard format class DrawTree supports is described by this BNF syntax. Nonterminal symbols are in italic font, terminal symbols are in typewriter font, | designates alternatives.
tree ::= node ;
node ::= ( childList ) nameLength
childList ::= child | child , childList
child ::= tip | node
tip ::= nameLength
nameLength ::= empty | name | : length | name : length
name ::= Any sequence of non-whitespace characters except ( ) , : ;
length ::= Floating point number, as in the Double.valueOf() method
This subset only supports non-quoted names with no whitespace; however, any underscore character _ in a name is replaced with a space character. The full Newick Standard format supports quoted names including whitespace. For further information about Newick Standard format, see:
Here is an example command to draw a tree and store it in the file "tree.dwg":
java edu.rit.compbio.phyl.DrawTree \
"(Gibbon:10,(Orangutan:8,(Gorilla:6,(Chimp:4,Human:4)))apes)primates;" tree.dwg
Here is the command to view the tree drawing:
java View tree.dwg
Here is the resulting drawing:
| Method Summary | |
|---|---|
static void |
main(String[] args)
Main program. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static void main(String[] args)
throws Exception
Exception
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||