View source: R/tree-sequences.R
| ts_extend | R Documentation |
Run the "extend haplotypes" algorithm to extend the span of sequence
covered by ancestral nodes, as implemented by the tskit method
TreeSequence.extend_haplotypes.
ts_extend(ts, iterations = 10)
ts |
Tree sequence object |
iterations |
Maximum number of iterations over the tree sequence (default is 10) |
For more details about this functionality, please read the following resources:
Paper by Fritze et al. 2025 (\Sexpr[results=rd]{tools:::Rd_expr_doi("10.1093/genetics/iyaf198")})
Official tskit documentation at https://tskit.dev/tskit/docs/stable/python-api.html#tskit.TreeSequence.extend_haplotypes
Note that this function has been currently tested exclusively on tree
sequences simulated by slendr's msprime() simulation engine.
Tree-sequence object of the class slendr_ts
init_env()
# load an example model with an already simulated tree sequence
slendr_ts <- system.file("extdata/models/introgression_msprime.trees", package = "slendr")
model <- read_model(path = system.file("extdata/models/introgression", package = "slendr"))
ts <- ts_read(slendr_ts, model)
ts_ext <- ts_extend(ts, iterations = 10)
ts_ext
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.