Learn R Programming

coala (version 0.2.0)

feat_selection: Adds positive selection to a model

Description

Adds positive selection to a model

Usage

feat_selection(strength_AA, strength_Aa, strength_A, population = 1, time)

Arguments

strength_AA
The selection strength for the selected homozygote
strength_Aa
The selection strength for the heterozygote.
strength_A
This sets the strength for the selected allele in an haploid model. strength_AA and strength_Aa are ignored when this is argument is given.
population
The population in which the allele is selected.
time
The time at which the selection starts.

Examples

Run this code
# Positive selection in population 2:
model <- coal_model(c(10, 13), 100) +
  feat_pop_merge(par_range('tau', .1, 2), 2, 1) +
  feat_selection(strength_AA=par_expr(2*s),
                 strength_Aa=par_range('s', 100, 2000),
                 population = 2,
                 time=par_expr(tau))

Run the code above in your browser using DataLab