generate_coselected_mutation: Generates 'nb_mut' co_selected mutations by calling...

Description Usage Arguments Value Examples

View source: R/generate_coselected_mutation.R

Description

Generates nb_mut co_selected mutations by calling sequentially generate_selected_mutation. So that the second mutation happens on the genetic background of the first selected mutants, the third mutations on the genetic background of the second selected mutants...

Usage

1
2
generate_coselected_mutation(nb_mut, n, lambda, maxfitness, pheno_wt,
  alpha = 1/2, Q = 2, m = n, nb_mut_rand = 10^4)

Arguments

nb_mut

A natural number. Number of mutations in the output.

n

A natural number. Number of dimensions of the phenotypic space in which the random mutations are drawn.

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

pheno_wt

A vector of real numbers. Phenotypic coordinates of the wild-type. Its length must be equal to the number of columns of pheno_mut_effect.

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.

m

A natural number inferior to n. Level of restricted pleiotropy which corresponds to the number of dimensions for which each mutation have a non-zero phenotypic effect. i.e. effects are equal to 0 in n-m dimensions. Default=n which corresponds to full pleiotropy.

nb_mut_rand

A natural number superior or equal to nb_mut. Number of random mutations to draw from which the mutant will be selected. This number must be large compared to nb_mut. Default=10^4.

Value

A matrix of nb_mut rows of coselected mutations effects, ordered by rows from the first mutation to the last mutation in increasing order. Note that if no beneficial mutation is drawn for a given mutant, NA are introduced from the corresponding row in the phenotype matrix to the end of the matrix. In this case nb_mut_rand must be increased.

Examples

1
2
3
4
5
generate_coselected_mutation(nb_mut = 5, n = 3, lambda = 0.1, maxfitness = 1,
                             pheno_wt = c(-1, 0, 0))
generate_coselected_mutation(nb_mut = 5, n = 3, lambda = 0.1, maxfitness = 1,
                             pheno_wt = c(-1, 0, 0), alpha = 1, Q = 0.5,
                             m = 2, nb_mut_rand = 10^5)

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