sumstat_seg_sites: Summary Statistic: Segregating Sites

View source: R/sumstat_seg_sites.R

sumstat_seg_sitesR Documentation

Summary Statistic: Segregating Sites


This summary statistics generates a matrix of segregating sites. This is useful for calculating summary statistics that coala does not support..


sumstat_seg_sites(name = "seg_sites", transformation = identity)



The name of the summary statistic. When simulating a model, the value of the statistics are written to an entry of the returned list with this name. Summary statistic names must be unique in a model.


An optional function for transforming the results of the statistic. If specified, the results of the transformation are returned instead of the original values.


A list of segsites objects. These can be treated as a matrix for most applications. Rows are individuals, columns are SNPs.

See Also

For a description of the segregating sites class: create_segsites

To create a demographic model: coal_model

To calculate this statistic from data: calc_sumstats_from_data

Other summary statistics: sumstat_dna(), sumstat_file(), sumstat_four_gamete(), sumstat_ihh(), sumstat_jsfs(), sumstat_mcmf(), sumstat_nucleotide_div(), sumstat_omega(), sumstat_sfs(), sumstat_tajimas_d(), sumstat_trees()


model <- coal_model(5, 1) +
  feat_mutation(5) +
stats <- simulate(model)

coala documentation built on May 29, 2024, 11:14 a.m.