View source: R/parameter_barge.R
Generate and transfer parameters, quantities, and objects used for fitting downstream convergent adaptation models.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 |
neutral_freqs |
Matrix of allele frequencies at putatively neutral sites with dimensions, number of populations x number of sites. |
selected_freqs |
Matrix of allele frequencies at putatively selected sites with dimensions, number of populations x number of sites. |
selected_pops |
Vector of indices for populations that experienced selection. |
positions |
Vector of genomic positions for the selected region. |
n_sites |
Integer for the number of sites to propose as the selected site. Sites are uniformly placed along |
sel_sites |
Optional vector of sites to propose as selected site. Useful if particular loci are suspected to be under selection. Cannot be used with |
sample_sizes |
Vector of sample sizes of length number of populations. (i.e. twice the number of diploid individuals sampled in each population). |
num_bins |
The number of bins in which to bin alleles a given distance from the proposed selected sites. |
sets |
A list of population indices, where each element in the list contains a vector of populations with a given mode of convergence. For example, if populations 2 and 6 share a mode and population 3 has another, sets = list(c(2,6), 3). Required for modeling multiple modes. Only required for fitting models with mixed modes. Must be used in conjunction with the "modes". |
modes |
Character vector of length sets defining mode for each set of selected populations ("independent", "standing", and/or "migration"). Only required for fitting models with mixed modes. More details about the modes is available on help page for |
sels |
Vector of proposed selection coefficients. |
migs |
Vector of proposed migration rates (proportion of individuals of migrat origin each generation). Cannot be 0. |
times |
Vector of proposed times in generations the variant is standing in populations before selection occurs and prior to migration from source population. |
gs |
Vector of proposed frequencies of the standing variant. |
sources |
Vector of population indices to propose as the source population of the beneficial allele. Used for both the migration and standing variant with source models. Note: the source must be one of the populations contained in selPops. |
Ne |
Effective population size (assumed equal for all populations). |
rec |
Per base recombination rate for the putatively selected region. |
locus_name |
String to name the locus. Helpful if multiple loci will be combined in subsequent analyses. Defaults to "locus". |
cholesky |
Logical to use cholesky factorization of covariance matrix. Used for both inverse and determinant. Faster, but not guaranteed to work for all data sets. TRUE by default. if FALSE, |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.