model_fgmrmut_2env: Function generating the fitness of the mutants' genotypes in...

Description Usage Arguments Value

View source: R/generate_model.R

Description

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 random 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_random_mutation for more information on the random 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 phenotypes see fitness_mutant_genotype.

Usage

1
2
model_fgmrmut_2env(nb_mut, genotype_table, fitness_wt_new_env, lambda,
  maxfitness, alpha, Q, theta, fun_args)

Arguments

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 (pheno_opt).

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 pheno_wt_ref), the pheno_wt_ref and the optimum of the new environement.

fun_args

List of parameters used to generate random 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 = #). For more information on these parameters, see the parameters in model_fgmrmut

Value

A vector of 2 * nb_mut real numbers. The elements from 1 to nb_mut are the fitnesses of the corresponding random 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.


YoannAnciaux/inferenceFitnessLandscape documentation built on Oct. 31, 2019, 1:19 a.m.