Documentation of 'edu.rit.compbio.phyl.DrawTree' Java class
DrawTree
edu.rit.compbio.phyl

Class DrawTree



  • public class DrawTree
    extends java.lang.Object
    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

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method and Description
      static void main(java.lang.String[] args)
      Main program.
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • main

        public static void main(java.lang.String[] args)
                         throws java.lang.Exception
        Main program.
        Throws:
        java.lang.Exception

DMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.