ts_descendants | R Documentation |
Extract all descendants of a given tree-sequence node
ts_descendants(ts, x, verbose = FALSE, complete = TRUE)
ts |
Tree sequence object of the class |
x |
An integer node ID of the ancestral node |
verbose |
Report on the progress of ancestry path generation? |
complete |
Does every individual in the tree sequence need to have
complete metadata recorded? If |
A table of descendant nodes of a given tree-sequence node all the way down to the leaves of the tree sequence
init_env()
# load an example model with an already simulated tree sequence
slendr_ts <- system.file("extdata/models/introgression_slim.trees", package = "slendr")
model <- read_model(path = system.file("extdata/models/introgression", package = "slendr"))
# load the tree-sequence object from disk
ts <- ts_read(slendr_ts, model)
# find the complete descendancy information for a given individual
ts_descendants(ts, x = 62, verbose = TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.