Description Usage Arguments Details Value See Also Examples
View source: R/simul.evol.enz.multiple.R
This function gives multiple simulations of evolution of enzyme concentrations under constraints
1 2 3 4 5 | simul.evol.enz.multiple(E_ini_fun, kin_fun, Keq_fun, nsim,
N_fun, correl_fun, beta_fun=NULL, X_fun=1, pasobs=250, npt=500,
same.E0=TRUE, is.random.E0=FALSE, same.kin0=TRUE, is.random.kin0=FALSE,
Etot_fun=100, kin_max=1000, max_mut_size_E=1, max_mut_size_A=1,
pmutA=0, typ_E=1, typ_A=1, use.old.mut=FALSE)
|
E_ini_fun |
Numeric vector of the initial concentrations |
kin_fun |
Numeric vector of the initial kinetic parameters |
Keq_fun |
Numeric vector of equilibrium constants |
nsim |
Numeric. Number of simulations |
N_fun |
Numeric. Population size |
correl_fun |
Character string indicating the abbreviation of the constraint applied on the system |
beta_fun |
Matrix of co-regulation coefficients |
X_fun |
Numeric. Numerator of function |
pasobs |
Numeric. Number of time steps between two successive observations of the system. Default is |
npt |
Numeric. Number of observations. Default is |
same.E0, same.kin0 |
Logical. Uses same |
is.random.E0, is.random.kin0 |
Logical. Is |
Etot_fun |
Numeric. Total concentration if |
kin_max |
Numeric. Maximal value for random |
max_mut_size_E |
Numeric. Maximum absolute size of mutation for enzyme concentrations. Default is 1 |
max_mut_size_A |
Numeric. Maximum absolute size of mutation for kinetic parameters. Default is 1 |
pmutA |
Numeric. Mutation probability of kinetic parameters.
Higher |
typ_E |
Numeric for mutation method. Authorized values: 1 or 2. Default is 1. |
typ_A |
Numeric for mutation method. Default is 1. See details in |
use.old.mut |
Logical. If |
Details about how does simulations work are in function simul.evol.enz.one
documentation.
Apply would also work, but only for multiple values of E_ini_fun
.
simul.evol.enz.multiple
gives all results in a same table, and has the possibility to change kinetic parameters between simulation.
Initial parameters
You can choose if initial concentrations and initial kinetic parameters are identical between all simulations by setting same.E0
and same.kin0
.
You can choose randomly initial concentrations and initial kinetic parameters by setting is.random.E0
and is.random.kin0
.
Four cases are possible. Examples are given for initial concentrations, but are the same for kinetic parameters, where same.E0
, is.random.E0
and E_ini_fun
are respectively same.kin0
, is.random.kin0
and kin_fun
.
same.E0
is TRUE
and is.random.E0
is FALSE
is default parameters. In this case, input E_ini_fun
of length n
is used for all simulations.
If same.E0
and is.random.E0
are TRUE
, E_ini_fun
is chosen randomly and used for all nsim
simulations.
If same.E0
is FALSE
and is.random.E0
TRUE
, each simulation has different random initial concentrations.
If same.E0
and is.random.E0
are FALSE
, a matrix of n
columns and nsim
rows is needed for E_ini_fun
, each row corresponding to one simulation.
$list_init
is the return for initial concentrations, kinetic parameters and activities.
Other details
Note that n
is the number of enzyme and is determined by length of Keq_fun
.
Invisible list of 6 elements:
$tabR
: dataframe of nsim x npt
rows and 3*n+4
columns.
Each row corresponds to state at each observation step (i.e. after pasobs
mutations),
and columns are respectively concentrations (1:n
), kinetic parameters (n+1:2n
), total concentration (2n+1
), total kinetic (2n+2
), flux/fitness (2n+3
), activities (2n+4:3n+3
), and simulation number ($sim
or 3n+4
);
$tabP_e
: numeric matrix of npt
rows and n+1
columns, corresponding to relative concentrations at equilibrium (column 1 to n
) for each observation step (in rows), plus column $sim
;
$tabP_r
: same as $tabP_e
, but for response coefficients
$list_init
: list of 3 elements, containing initial values of concentrations in $E0
, kinetic parameters in $kin0
and activities in $A0
for each simulation. Each element is a numeric matrix of nsim
rows (one by simulation) and n
columns (one by enzyme);
$list_final
: list of 3 elements, containing final values of concentrations in $E_f
, kinetic parameters in $kin_f
and activities in $A_f
for each simulation. Each element is a numeric matrix of nsim
rows and n
columns;
$param
: list of input parameters.
Note that n
is the number of enzymes, which is the length of E_ini_fun
.
See function simul.evol.enz.one
to see how works a simulation.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 | # case for 3 enzymes
n <- 3
E0 <- c(30,30,30)
kin <- c(1,10,30)
Keq <- c(1,1,1)
nsim <- 2 # 2 simulations
N <- 1000
beta <- diag(1,n)
beta[upper.tri(beta)] <- c(0.32,0.32*(-0.43),-0.43)
#beta_12 = 0.32, beta_13 = beta_12 x beta_23, beta_23 = -0.43
t_beta <- t(beta) #because R fills matrix column by column
beta[lower.tri(beta)] <- 1/t_beta[lower.tri(t_beta)] #beta_ji = 1/beta_ij
if (n==3) {beta[lower.tri(beta)] <- 1/beta[upper.tri(beta)]} #only available if n=3
correl <- "RegNeg"
evol_sim <- simul.evol.enz.multiple(E0,kin,Keq,nsim,N,correl,beta)
evol_sim$tabR[,1:n] #concentrations
evol_sim$tabR[,(n+1):(2*n)] #kinetic parameters
evol_sim$tabR[,(2*n+1)] #total concentration
evol_sim$tabR[,(2*n+2)] #total kinetic
evol_sim$tabR[,(2*n+3)] #flux
evol_sim$tabR[,(2*n+4):(3*n+3)] #activities
evol_sim$tabR$sim #simulation number
evol_sim$tabR[evol_sim$tabR$sim==2,] #results for 2nd simulation
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.