For a discussion on the difference between "site" and "branch" options of the mode argument, please see the tskit documentation at https://tskit.dev/tskit/docs/stable/stats.html#sec-stats-mode

ts_tajima(ts, sample_sets, mode = c("site", "branch", "node"), windows = NULL)

Arguments

ts

pyslim.SlimTreeSequence object

sample_sets

A list (optionally a named list) of character vectors with individual names (one vector per set)

mode

The mode for the calculation ("sites" or "branch")

windows

Coordinates of breakpoints between windows. The first coordinate (0) and the last coordinate (equal to ts$sequence_length) are added automatically)

Value

For each set of individuals either a single Tajima's D value or a vector of Tajima's D values (one for each window)