Learn R Programming

coala (version 0.4.0)

feat_recombination: Feature: Recombination

Description

This feature adds intra-locus recombination to a model. The rate is per locus for unlinked loci and per trio for linked locus trios. By default, the same recombination rate is used for all loci, but it is possible to change this with par_variation and par_zero_inflation. Coala assumes that recombination events can occur between all neighboring bases.

Usage

feat_recombination(rate)

Arguments

rate
The recombination rate. Can be a numeric or a parameter. The rate is equal to $4*N0*r$, where $r$ is the probability that a recombination event within the locus occurs in one generation.

Value

The feature, which can be added to a model using `+`.

See Also

For adding recombination: feat_mutation.

Other features: feat_growth, feat_ignore_singletons, feat_migration, feat_mutation, feat_outgroup, feat_pop_merge, feat_selection, feat_size_change, feat_unphased

Examples

Run this code
# Simulate a 1.5kb sequence for 10 individuals with recombination:
model <- coal_model(10, 2, 1500) +
  feat_recombination(1.5) +
  feat_mutation(5) +
  sumstat_sfs()
simulate(model)

Run the code above in your browser using DataLab