This repository contains code for calculating the likelihood of observations of colony growth rates in Spontaneous single-nucleotide substitutions and microsatellite mutations have distinct distributions of fitness effects.
The following abbreviations refer to models described in the text:
- poissonmut: 'SNMs only' model
- lambdafit: SNMs + unidentified mutations, ‘single DFE’ model
- mixedgauss: SNMs + unidentified mutations, ‘Gaussian’ model
- mixed_digamma: SNMs + unidentified mutations, ‘two-gamma’ model
pre_MLE...
andpost_MLE...
functions perform functions that occur before and after optimization, respectively, that don't need to happen in each round of optimization (e.g. loading in data and organizing inputs in the case ofpre_MLE...
functions, organizing multiple outputs in the case ofpost_MLE...
functions). These are essentially used for 'housekeeping' and are not necessary for understanding the implementation of the math described in the paperLL_...
functions calculate likelihoods of data; these are named directly in the setup files for each model. Note that some likelihood calculation functions perform optimization calling functions from MutationEffectEstimation.LL_mixef_calc
performs the likelihood calculation for Equation 5LL_calculator_within_pair_different_sigmas
calculates the likelihood of observed growth rate differences described in Equation 8; however, this code is run indirectly in order to allow for likelihood maximization across general parameters and multiple strains- for estimation of mutational effect parameters relative to a single in-well control,
LL_calculator_strain_looper_pairwise
is used - for estimation of mutation effect parameters relative to a non-marked strain present in a subset of wells,
LL_calculator_strain_looper_pairwise_multiref_with_mixef
is used
- for estimation of mutational effect parameters relative to a single in-well control,
LL_calculator_me_estimate_single_dfe
performs the likelihood calculation whose fourier transform is described in Equation 16LL_calculator_observed_diffs_given_me_dist
performs the likelihood calculation in Equation 17; however, this code is run indirectly in order to allow for likelihood maximization across general parameters and multiple strains, throughLL_calculator_single_DFE
sim...
functions (e.g.sim_mut_effect_poissonmut
) simulate mutational effect or growth rate data from a set of parameters (dimensionality of data simulated matches provided input data)nonlin_constraint...
functions (e.g.nonlin_constraint_poissonmut
) calculate non-linear constraints on parameter values to be used during optimizationfourier_dfe_...
functions (e.g.fourier_dfe_poissonmut
) calculate the characteristic function for a distribution of mutational effects
There are also a number of accessory functions used for e.g. safely converting between fourier space and mutational effect space, etc.