sumstat_sfs | R Documentation |
The Site Frequency Spectrum (SFS) counts how many SNPs are in a sample according to their number of derived alleles.
sumstat_sfs(name = "sfs", population = "all", transformation = identity)
name |
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. |
population |
The population for which the statistic is calculated. Can also be "all" to calculate it from all populations. Default is population 1. |
transformation |
An optional function for transforming the results of the statistic. If specified, the results of the transformation are returned instead of the original values. |
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_seg_sites()
,
sumstat_tajimas_d()
,
sumstat_trees()
model <- coal_model(20, 500) +
feat_mutation(2) +
sumstat_sfs()
stats <- simulate(model)
barplot(stats$sfs)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.