Compiling and running population genetic models 


Run a slendr model in SLiM 

Run a slendr model in msprime 

Compile a slendr demographic model 

Read a previously serialized model configuration 

Define sampling events for a given set of populations 

Installation and configuration of Python dependencies 

Setup a dedicated Python virtual environment for slendr 

Remove the automatically created slendr Python environment 

Check that the active Python environment is setup for slendr 

Model components 

Define a population 

Define a world map for all spatial operations 

Spatial population dynamics 

Move the population to a new location in a given amount of time 

Expand the population range 

Shrink the population range 

Update the population range 

Change dispersal parameters 

Nonspatial population dynamics 

Define a geneflow event between two populations 

Change the population size 

Manipulation of spatial objects 

Define a geographic region 

Merge two spatial 

Generate the overlap of two 

Generate the difference between two 

Reproject coordinates between coordinate systems 

Calculate the distance between a pair of spatial boundaries 

Calculate the area covered by the given slendr object 

Model visualization and diagnostics 

Plot 

Plot demographic history encoded in a slendr model 

Animate the simulated population dynamics 

Open an interactive browser of the spatial model 


Print a short summary of a 
Print tskit's summary table of the Python treesequence object 

Tree sequence loading and processing 

Load a tree sequence file produced by a given model 

Save a tree sequence to a file 

Recapitate the tree sequence 

Simplify the tree sequence down to a given set of individuals 

Add mutations to the given tree sequence 

Check that all trees in the tree sequence are fully coalesced 

Extract names and times of individuals of interest in the current tree sequence (either all sampled individuals or those that the user simplified to) 

Tree sequence format conversion 

Extract genotype table from the tree sequence 

Convert genotypes to the EIGENSTRAT file format 

Save genotypes from the tree sequence as a VCF file 

Accessing tree sequence components 

Extract combined annotated table of individuals and nodes 

Extract spatiotemporal edge annotation table from a given tree or tree sequence 

Get the table of individuals/nodes/edges/mutations from the tree sequence 

Convert a tree in the tree sequence to an object of the class 

Get a tree from a given tree sequence 

Plot a graphical representation of a single tree 

Extract list with tree sequence metadata saved by SLiM 

Extract (spatio)temporal ancestral history for given nodes/individuals 

Extract all descendants of a given treesequence node 

Tree sequence statistics 

Calculate the f2, f3, f4, and f4ratio statistics 

Compute the allele frequency spectrum (AFS) 

Calculate pairwise divergence between sets of individuals 

Calculate diversity in given sets of individuals 

Calculate pairwise statistics between sets of individuals 

Calculate Tajima's D for given sets of individuals 

Calculate the density of segregating sites for the given sets of individuals 