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.

Usage

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

Arguments

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

Details

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.

Example

trees=readTrees(text="(a,(b,c));\n(d:0.1,(e:0.1,f:0.1):0.1);")
print(trees)

See Also