Learn R Programming

SimEvolEnzCons (version 2.0.0)

RNV.mean.simul: Mean of RNV size in simulation

Description

Computes mean of RNV size from simulation results and gives a graph of this RNV mean in relation to the RNV-ranking-order factor. Computes also a linear model of RNV mean in relation to RNV-ranking-order factor.

Usage

RNV.mean.simul(all_res_sim,end.mean=TRUE,which.sim=NULL,add.lm=TRUE,
add.mean=TRUE,add.pred.e=FALSE,
show.plot=TRUE,new.window=FALSE,cex.lab=1,mar.lab=2.5,...)

Arguments

all_res_sim

List, the output of function simul.evol.enz.multiple (results of evolution simulation).

end.mean

Logical. If FALSE, compute RNV size mean for all rows of res_sim. If TRUE, compute RNV size mean for last half of res_sim rows.

which.sim

Numeric vector containing integer numbers between 1 and nsim. Which simulations would you represent? If NULL (default), all simulations would be represented.

add.lm

Logical. Add line of linear model in graphics?

add.mean

Logical. Add mean of RNV size between all selected simulation for each enzyme?

add.pred.e

Logical. Add predicted relative concentrations mean between selected simulations? See concerned graphs in details

show.plot

Logical. Are plots visible?

new.window

Logical. Do graphics appear in a new window?

cex.lab

Numeric. Size of axis label.

mar.lab

Numeric. Distance of label from axis.

...

Arguments to be passed in plot function, such as lwd or cex.

Value

Invisible list of 5 elements:

  • $RNV_all_sim: list of nsim elements (which is the number of simulation). Each element i contains the output of function RNV.for.simul for corresponding simulation i. If simulation is not selected by which.sim, corresponding element is NULL.

  • $RNV_mean_size: numeric matrix of n+2 columns and number of rows is between length(which.sim) and 2*length(which.sim) (depending if there is one or two RNVs). Each of the n first columns is the RNV mean size for corresponding enzyme. Column n+1 indicates the simulation number and column n+2 the RNV number (1 for near RNV and 2 for far RNV).

  • $rank_var_value: numeric matrix of n columns and length(which.sim) rows. Each cell is the value of the RNV-ranking-order factor to which RNV mean size is compared, for each simulation (in row) (in column) and each enzyme.

  • $rank_var_name: character string, indicating the name of the RNV-ranking-order factor.

  • $lm_RNV: object of class "lm". Linear model of RNV the mean (only for near RNV or RNV number 1) in relation to the RNV-ranking-order factor.

Details

RNV.mean.simul works in three parts:

  1. computing mean of RNV size

  2. plotting RNV mean in relation to various variables

  3. computing RNV mean against RNV-ranking-order factor

About RNV mean computing

Function RNV.mean.simul is designed to compute mean of RNV size in simulations launched by simul.evol.enz.multiple. Input all_res_sim is the output of simul.evol.enz.multiple.

RNV mean is computed by enzyme and by simulation, and a general mean for each enzyme (between selected simulations) is also computed.

RNV mean is made on all rows in simulation results (end.mean=FALSE) or only on last half rows of each simulation (end.mean=TRUE), i.e. when equilibrium is reached.

About graphics

Function RNV.mean.simul gives three graphics:

  1. RNV mean in relation to activities

  2. RNV mean in relation to the RNV-ranking-order factor (see RNV.ranking.order.factor)

  3. RNV mean in relation to a soft value of the RNV-ranking-order factor (activities A for "SC" and "Comp"; global co-regulations coefficients B for "RegPos" and "RegNeg"; the hard value of the RNV-ranking-order factor for "CRPos" and "CRNeg"). Squares correspond to simulation.

Each simulation corresponds to one color. Colors for simulations are taken in palette rainbow.

About linear model

Function RNV.mean.simul computes also a linear model of RNV mean in relation to the RNV-ranking-order factor between all simulations (and not only selected ones by which.sim). If wanted, linear model can be put on graphics.

About logical parameters

Last graphic is RNV mean in relation to an interest variable, which is activities A ("SC" or "Comp" cases), global co-regulation coefficients B ("RegPos" or "RegNeg" cases) or the RNV-ranking-order factor ("CRPos" or "CRNeg" cases, see above).

In this last graphic, add.mean=TRUE adds the mean of RNV size between selected simulations, with black squares and line.

Also in this last graphic, add.pred.e=TRUE adds mean (between selected simulations) of the predicted relative concentrations at equilibrium, with grey axis, grey dots and grey dashed line.

add.lm=TRUE adds the linear model (black line) in the second graph (RNV mean against the RNV-ranking-order-factor).

See Also

RNV is computed with function RNV.for.simul.

Use function graph.simul.by.time.RNV to have other representations of RNV.

See function RNV.ranking.order.factor for details about RNV-ranking-order factor.

Examples

Run this code
# NOT RUN {
# With saved simulation
data(data_sim_SC)
RNV.mean.simul(data_sim_SC,new.window=TRUE,which.sim=c(1,5,10))


# }
# NOT RUN {
# 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
correl <- "SC"

evol_sim <- simul.evol.enz.multiple(E0,kin,Keq,nsim,N,correl,npt=250)

RNV.mean.simul(evol_sim,new.window=TRUE)
# }
# NOT RUN {

# }

Run the code above in your browser using DataLab