sumstat_four_gamete {coala}R Documentation

Summary Statistic: Four-Gamete-Condition


This summary statistic calculates a number of values (see 'Value') related to the Four-Gamete-Condition (see 'Details'). It is sensitive for recombination and particularly useful when estimating recombination rates with jaatha or Approximate Bayesian Computation.


  name = "four_gamete",
  population = 1,
  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.


The population for which the statistic is calculated. Can also be "all" to calculate it from all populations.


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


The Four-Gamete-Condition for two SNPs is violated if all four combinations of derived and ancestral alleles at the SNPs are observed in a gamete/a haplotype. Under an Infinite-Sites mutation model, a violation indicates that there must have been at least one recombination event between the SNPs.


The statistic generates a matrix where each row represents one locus, and the columns give the statistic for different classes of pairs of SNPs:


The value for all pairs of SNPs that are close together, that is within 10 percent of the locus" length. If locus trios are used, only pairs of SNPs were both SNPs are on the middle locus are considered.


Same as mid_near, but for pairs of SNPs that are more that 10 percent of the locus" length apart.


Only when using locus trios. The statistic for pairs where both SNPs are on the same outer locus.


Only when using locus trios. The statistic for pairs where one SNPs is on the middle locus, and the other is on an outer one.


The value for all pairs on the middle locus or all pairs when not using trios.


The percentage of positions that are polymorpic.

Unphased Data

For unphased data, the four gamete condition is only counted as violated if it is violated for all possible phasing of the data.

See Also

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_ihh(), sumstat_jsfs(), sumstat_mcmf(), sumstat_nucleotide_div(), sumstat_omega(), sumstat_seg_sites(), sumstat_sfs(), sumstat_tajimas_d(), sumstat_trees()


model <- coal_model(5, 2) +
 feat_mutation(50) +
 feat_recombination(10) +
stats <- simulate(model)

[Package coala version 0.6.0 Index]