fitnessLandscape: This function will calculate the fitness values for genotypes...

Description Usage Arguments Value Note

View source: R/sourceSHAPE.R

Description

This function will calculate the fitness values for genotypes being newly recorded to the fitness landscape.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
fitnessLandscape(tmpGenotypes, tmp_focalFitness, landscapeModel = "HoC",
  tmp_ancestralFitness = getOption("shape_const_ancestFitness"),
  tmp_weightsRMF = getOption("shape_const_RMF_theta"),
  tmp_optimaRMF = getOption("shape_const_RMF_globalOptima"),
  tmp_correlationsNK = getOption("shape_const_NK_interactionMat"),
  tmp_const_numInteractionsNK = getOption("shape_const_numInteractions"),
  tmp_NK_ancestDep = getOption("shape_const_DepbySite_ancestFitness"),
  relativeFitness = TRUE,
  func_genomeLength = getOption("shape_genomeLength"),
  func_distribution = getOption("shape_constDist"),
  func_distParameters = getOption("shape_const_distParameters"),
  func_distAsS = getOption("shape_const_distAsS"),
  func_sepString = getOption("shape_sepString"))

Arguments

tmpGenotypes

This is a vector of the binaryString values that represent the genotype(s) for which you want to calculate new fitness values.

tmp_focalFitness

This argument has different meaning depending upon the fitness landscape model being simulated. It can be a vector of fitness values, a matrix, a single value, etc...

landscapeModel

This is the character string that defines the fitness landscape model being simulated in this SHAPE run. At present it can be one of: Additive, Fixed, HoC, NK, RMF

tmp_ancestralFitness

This is the fitness value of the pure WT genotype, it does not always have meaning.

tmp_weightsRMF

This is the weighting of the constant/deterministic term calculated in the RMF fitness landscape equation.

tmp_optimaRMF

This is the binary string genotype of the optimal genotype in the current RMF fitness landscape. It needn't yet have been yet explored, it is simply the genotype that will be the deterministic global optimum.

tmp_correlationsNK

This is the matrix of fitness values and interactions between mutational states for the NK fitness lanscape model

tmp_const_numInteractionsNK

This is the "K" value of the NK fitness landscape value and represents the number of other sites correlated to the fitness of a focal site.

tmp_NK_ancestDep

This is the fitness value of the WT mutant for an NK fitness landscape, it is passed as a computational ease so that it needn't be calculated each time this function is called.

relativeFitness

This is a logical toggle controlling if the fitness values returned should be relative fitness values

func_genomeLength

This is the genome length of individuals.

func_distribution

This is a character string representing which of the allowed distribution functions can be called for draws of stochastic values when calculating fitness values. See fitnessDist for those implemented.

func_distParameters

This is a vector of the ordered distribution parameters expected by the distribution referenced by func_distribution

func_distAsS

This is a logical toggle to control in the final returned values should be considered as selection coefficients, which is achieved by subtracting the calculated value by 1.

func_sepString

This is a character string used for collapsing vectors of information, and expanding the collpased information back into a vector of values.

Value

A vector of fitness values to be assgined for each of the newly explored genotypes defined in the vector tmpGenotypes

Note

There is no example as this does not have meaning outisde of a runSHAPE call.


rSHAPE documentation built on July 19, 2019, 5:05 p.m.