mode_cle: Fit composite likelihood model of convergent adaptation.

Description Usage Arguments Value

View source: R/mode_cle.R

Description

Fit composite likelihood model of convergent adaptation.

Usage

1
mode_cle(barge, mode)

Arguments

barge

List of parameters and data generated using parameter_barge

mode

Specify the mode of convergent adaptation. Options are:

"neutral" – Neutral model. Returns same composite likelihood across all sites.

"independent" – Selected mutation occurred independently in all populations specified in selected_pops

"migration" – Selected mutation occurs in a source population (post-divergence) and migrates to other populations specified in selected_pops during the course of the sweep.

"standing" – Selected mutation is present at low frequency in ancestral population and sweeps in selected_pops populations after divergence.

"standing_source" – Selected mutation is present at low frequency, experiences migration from a source population prior to selection, sweeps in selected_pops after migration.

"multi" – Some mix of the modes above, with the exception of "standing", which is not currently supported for mixed modes. See sets and modes arguments for parameter_barge for proper input format.

Value

Regardless of the mode, the function returns a data frame with the same columns. When a column does not pertain to a mode, NA values are added to ensure the data frames of different modes can be easily joined. The columns are:

selected_sites – The proposed sites of selection constructed with or provided to parameter_barge.

cle – The composite likelihood for that row's combination of parameters.

locus – The user specified name of the input locus. Helpful if multiple loci will be combined in later analysis.

sels – Selection coefficient.

gs – Allele frequence of the standing variant prior to sweep.

times – Time in generations the variant is standing in populations before selection occurs and prior to migration from source population.

migs – Migration rate.

sources – The population where the new mutation originated.

sel_pops – Hyphen delimited string of the selected populations.

model – The mode of convergent adaptation proposed. When multi modes are used, the modes apply to which


silastittes/rdmc documentation built on Jan. 31, 2021, 1:49 a.m.