check_dependencies(python = TRUE, quit = TRUE) # dependencies must be present
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 IBD segments between specified Neanderthals and Europeans
ts_ibd(
ts,
coordinates = TRUE,
between = list(c("NEA_1", "NEA_2"), c("EUR_1", "EUR_2")),
minimum_length = 40000
)
Run the code above in your browser using DataLab