sumstat_dna: Summary Statistic: DNA

View source: R/sumstat_dna.R

sumstat_dnaR Documentation

Summary Statistic: DNA


This summary statistic returns the actual DNA sequences from finite sites simulations. It can not be calculated together with other summary statistics or when assuming an infinite sites mutation model. No outgroup is needed for it, and the outgroup sequences will also be returned if present.


sumstat_dna(name = "dna", 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 sequences for each locus. Each entries is a character matrix decoding the sequences. Each row is an individual, and each column is a genetic position.

See Also

To create a demographic model: coal_model

To calculate this statistic from data: calc_sumstats_from_data

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


model <- coal_model(5, 1, 10) +
 feat_mutation(5, model = "GTR", gtr_rates = rep(1, 6)) +
## Not run: simulate(model)$dna

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