Rev Language Reference

readTrees - Function to read in trees.

Reads trees from a file containing trees (Nexus, Phylip or Newick accepted), or from a string containing Newick representations of trees.


readTrees(String file, String text, String treetype, Bool unroot_nonclock)


file : String (pass by value)
The name of the file containing the trees.
text : String (pass by value)
A string containing one or several newick trees, separated by end of lines.
treetype : String (pass by value)
The type of trees.
Default : clock
Options : clock|non-clock
unroot_nonclock : Bool (pass by value)
Remove a degree-2 root node and set the tree unrooted, if treetype is non-clock.
Default : TRUE

Return Type


Either a file name (with the file argument) or a string (with the text argument) must be provided as argument. If both are provided, trees will be read from both sources.



See Also