Rev Language Reference


Finds the maximum a posteriori (MAP) topology from a trace of trees and summarizes branch lengths.


mapTree(TraceTree trace, String file, Bool ccAges, Bool ccp, Bool conditionalAges, Probability hpd, Bool mean, Bool sampledAncestors, Bool positiveBranchLengths)


trace : TraceTree (pass by reference)
The samples of trees from the posterior.
file : String (pass by value)
The name of the file where to store the tree.
ccAges : Bool (pass by value)
Annotate conditional clade ages?
Default : FALSE
ccp : Bool (pass by value)
Annotate conditional clade probabilities?
Default : FALSE
conditionalAges : Bool (pass by value)
Annotate node ages conditional on the topology?
Default : FALSE
hpd : Probability (pass by value)
The probability mass of the highest posterior density node age interval.
Default : 0.95
mean : Bool (pass by value)
Annotate node ages using the mean age instead of the median?
Default : TRUE
sampledAncestors : Bool (pass by value)
Annotate sampled ancestor probs?
Default : TRUE
positiveBranchLengths : Bool (pass by value)
Force negative branch lengths to be short but positive?
Default : FALSE

Return Type


# Read in tree trace
tree_trace = readTreeTrace("output/my.trees", burnin=0.25)

# Generate the MAP tree
map_tree = mapTree(trace=tree_trace, file="map.tree")

See Also