A Simulation Framework for Spatiotemporal Population Genetics


[Up] [Top]

Documentation for package ‘slendr’ version 0.9.1

Help Pages

animate_model Animate the simulated population dynamics
area Calculate the area covered by the given slendr object
check_dependencies Check that the required dependencies are available for slendr to work
check_env Check that the active Python environment is setup for slendr
clear_env Remove the automatically created slendr Python environment
compile_model Compile a slendr demographic model
distance Calculate the distance between a pair of spatial boundaries
expand_range Expand the population range
explore_model Open an interactive browser of the spatial model
gene_flow Define a gene-flow event between two populations
get_env Get the name of the current slendr Python environment
init_env Activate slendr's own dedicated Python environment
join Merge two spatial 'slendr' objects into one
move Move the population to a new location in a given amount of time
msprime Run a slendr model in msprime
overlap Generate the overlap of two 'slendr' objects
plot_map Plot 'slendr' geographic features on a map
plot_model Plot demographic history encoded in a slendr model
population Define a population
print.slendr_map Print a short summary of a 'slendr' object
print.slendr_model Print a short summary of a 'slendr' object
print.slendr_pop Print a short summary of a 'slendr' object
print.slendr_region Print a short summary of a 'slendr' object
print.slendr_ts Print tskit's summary table of the Python tree-sequence object
read_model Read a previously serialized model configuration
region Define a geographic region
reproject Reproject coordinates between coordinate systems
resize Change the population size
schedule_sampling Define sampling events for a given set of populations
setup_env Setup a dedicated Python virtual environment for slendr
set_dispersal Change dispersal parameters
set_range Update the population range
shrink_range Shrink the population range
slim Run a slendr model in SLiM
subtract Generate the difference between two 'slendr' objects
summary.slendr_nodes Summarise the contents of a 'ts_nodes' result
ts_afs Compute the allele frequency spectrum (AFS)
ts_ancestors Extract (spatio-)temporal ancestral history for given nodes/individuals
ts_coalesced Check that all trees in the tree sequence are fully coalesced
ts_descendants Extract all descendants of a given tree-sequence node
ts_divergence Calculate pairwise divergence between sets of individuals
ts_diversity Calculate diversity in given sets of individuals
ts_draw Plot a graphical representation of a single tree
ts_edges Extract spatio-temporal edge annotation table from a given tree or tree sequence
ts_eigenstrat Convert genotypes to the EIGENSTRAT file format
ts_f2 Calculate the f2, f3, f4, and f4-ratio statistics
ts_f3 Calculate the f2, f3, f4, and f4-ratio statistics
ts_f4 Calculate the f2, f3, f4, and f4-ratio statistics
ts_f4ratio Calculate the f2, f3, f4, and f4-ratio statistics
ts_fst Calculate pairwise statistics between sets of individuals
ts_genotypes Extract genotype table from the tree sequence
ts_ibd Collect Identity-by-Descent (IBD) segments (EXPERIMENTAL)
ts_load Load a tree sequence file produced by a given model
ts_metadata Extract list with tree sequence metadata saved by SLiM
ts_mutate Add mutations to the given tree sequence
ts_names Extract names of individuals in a tree sequence
ts_nodes Extract combined annotated table of individuals and nodes
ts_phylo Convert a tree in the tree sequence to an object of the class 'phylo'
ts_recapitate Recapitate the tree sequence
ts_samples Extract names and times of individuals of interest in the current tree sequence (either all sampled individuals or those that the user simplified to)
ts_save Save a tree sequence to a file
ts_segregating Calculate the density of segregating sites for the given sets of individuals
ts_simplify Simplify the tree sequence down to a given set of individuals
ts_table Get the table of individuals/nodes/edges/mutations from the tree sequence
ts_tajima Calculate Tajima's D for given sets of individuals
ts_tracts Extract ancestry tracts from a tree sequence (EXPERIMENTAL)
ts_tree Get a tree from a given tree sequence
ts_vcf Save genotypes from the tree sequence as a VCF file
world Define a world map for all spatial operations