Description Usage Arguments Value
View source: R/generate_model.R
Function generating the fitness of the mutants' genotypes in genotype_table
in both the new and the reference environment. Mutants are produced by
combining nb_mut
selected mutations generated from the wt with fitness
fitness_wt_ref
(in fun_args
) in the reference environment.
Fitnesses are computed using an isotropic FGM in two dimensions with the parameters
passed to fun_args
. See generate_selected_mutation
for more information on the selected mutations. The fitness of the mutants in the
new environment are then computed in a two (or one) dimensions isotropic FGM
with the dimensions corresponding to the two (or the unique) first dimensions
in which the mutants were generated in the environment of reference. For more
informations on the positionning of the optimum of the new environment see
pos_new_env
. For more informations on the computation of fitness
from genotype see fitness_mutant_genotype
.
1 2 | model_fgmsmut_2env(nb_mut, genotype_table, fitness_wt_new_env, lambda,
maxfitness, alpha, Q, theta, fun_args)
|
nb_mut |
A natural number. Number of mutations in the output. |
genotype_table |
A matrix of 0 and 1. The rows correspond to different genotypes and the columns to the mutations that are considered for these genotypes. A genotype (at a certain row) has a given mutation when there is a 1 in the corresponding column. A row with only zeros correspond to the wild type. |
fitness_wt_new_env |
A real number. Fitness of the wild type in the new environment. |
lambda |
A positive real number. Variance of the effect of mutations on phenotype per phenotypic dimension. |
maxfitness |
A real number. The maximum fitness in the landscape. The
fitness at the phenotypic optimum ( |
alpha |
A strictly positive real number. Scaling factor for the fitness function. Default=1/2 in the cannonical FGM with a quadratic fitness function. |
Q |
A strictly positive number. "Shape" of the fitness function. Default=2 in the cannonical FGM with a quadratic fitness function. |
theta |
A angle in radian between 0 and 2 * pi. Angle between the optimum
of the environment of reference (first dimension of |
fun_args |
List of parameters used to generate selected mutants in the reference environment.
Must take the form :
fun_args = list(fitness_wt_ref = #, n_ref = #, lambda_ref = #, maxfitness_ref = #,
alpha_ref = #, Q_ref = #, m_ref = #). Can optionnaly take the element nb_mut_ran.
For more information on these parameters, see the parameters in |
A vector of 2 * nb_mut
real numbers. The elements from 1 to nb_mut
are the fitnesses of the corresponding selected mutants in genotype_table
(in the same order as the rows) in the reference environment. The elements from
nb_mut
+ 1 to 2 * nb_mut
are the fitnesses of the same mutants
(in the same order) in the new environment.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.