sumstat_dna {coala} | R Documentation |
Summary Statistic: DNA
Description
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.
Usage
sumstat_dna(name = "dna", transformation = identity)
Arguments
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. |
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. |
Value
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()
Examples
model <- coal_model(5, 1, 10) +
feat_mutation(5, model = "GTR", gtr_rates = rep(1, 6)) +
sumstat_dna()
## Not run: simulate(model)$dna