phylo
R/tree-sequences.R
ts_phylo.Rd
Convert a tree in the tree sequence to an object of the class phylo
Tree sequence object of the class slendr_ts
Position of the tree in the tree sequence. If mode = "index"
,
an i-th tree will be returned (in one-based indexing), if mode =
"position"
, a tree covering an i-th base of the simulated genome will be
returned.
How should the i
argument be interpreted? Either "index"
as an i-th tree in the sequence of genealogies, or "position" along the
simulated genome.
What should be stored as node labels in the final phylo
object? Options are either a population name or a tskit integer node ID
(which is a different thing from a phylo
class node integer index).
Should ape's internal phylo validity test be printed out?
if (FALSE) # extract a 42nd tree from a given tree sequence, return ape object
tree <- ts_phylo(ts, i = 42, mode = "index")
# extract a tree at a 42th basepair in the given tree sequence
tree <- ts_phylo(ts, i = 42, mode = "position")