graph.simul.triangle.diagram.e: Triangular diagram of relative concentrations for simulations...

Description Usage Arguments Details Value See Also Examples

View source: R/graph.simul.triangle.diagram.R

Description

Graphics of enzyme evolution simulations obtained by function simul.evol.enz.multiple. Function graph.simul.triangl.diagram.e gives a triangular diagram of relative concentrations.

Usage

1
2
3
graph.simul.triangle.diagram.e(all_res_sim,which.enz=c(1,2,3),which.sim=NULL,
new.window=FALSE,add.eq=TRUE,add.line.eq.eff=FALSE,add.curve.lines=FALSE,
nbniv=9,niv.palette=NULL,posi.legend="topleft",cex.ini=1,cex.th=1.2,cex.eff=0.6)

Arguments

all_res_sim

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

which.enz

Numeric. Which enzymes would be represented? Default is the first three enzymes, i.e. c(1,2,3).

which.sim

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

new.window

Logical. Do graphics appear in a new window?

add.eq

Logical. Do equilibrium appear on graph?

add.line.eq.eff

Logical. Add line of effective equilibrium for all initial concentrations? Default is FALSE. See details.

add.curve.lines

Logical. Add curve lines for flux dome? Default is FALSE. See details.

nbniv

Numeric. Number of contour lines, between 3 and 11. Default is 9

niv.palette

Character vector. Color palette to be passed to contour lines.

posi.legend

Contour line legend position. See details.

cex.ini, cex.th, cex.eff

Numeric. Size of remarkable points (respectively initial, theoretical and effective relative concentrations).

Details

WARNING! If there is more than three enzymes in simulations (n>3), be careful for interpretations. Indeed, triangular diagram is projection of a plane for which sum of coordinates is equal to 1. In other words, if n>3, represented points are not strictly relative concentrations such as e_i = E_i / Etot, but are x_i = E_i / (E_i + E_j + E_k) for the three represented enzymes i, j and k.

Triangular diagram cannot be developed if there is less than three enzymes (n<3 or length(which.enz)<3). Indeed, it is a three-dimensional graph.

If there is only one simulation (length of which.sim equal to 1), color is black. Else, color are taken in palette rainbow.

Option add.line.eq.eff=TRUE adds a line of effective equilibrium for all possible initial concentrations. This line is only available for certain constraints, which are "CRPos" and "CRNeg". Code is written only for three enzymes n=3, and requires to use same initial kinetic parameters for all simulations (set same.kin0=TRUE) and no mutation of activities (set pmutA=0). Also, same initial total concentration for all enzyme is required. Easiest way is to set is.random.E0=TRUE. See function predict_eff_allE0.

Option add.curve.lines=TRUE adds contour lines of flux dome. Contour lines are only available in case of competition, which are "Comp", "CRPos" and "CRNeg". It is only available for three enzymes n=3, and other conditions are the same than option add.line.eq.eff=TRUE. nbniv and niv.palette adjust number and color of contour lines respectively. See function flux.dome.projections.

In triangular diagram, left axis correspond to first value of which.enz for enzyme number, bottom axis to its second value and right axis to its third value. If options add.line.eq.eff=TRUE or add.curve.lines=TRUE are chosen and if all tests have been successfully passed, which.enz is automatically set to c(1,2,3).

Value

Invisible matrix why_no_lines who explain why line of effective equilibrium or curve lines not appear even the corresponding options are set to TRUE. If why_no_lines is NULL, options add.line.eq.eff and add.curve.lines have been set to FALSE (default).

Function graph.simul.triangle.diagram.e returns point coordinates on triangular diagram.

See Also

See simul.evol.graph.methods for other plots of enzyme evolution simulation.

See flux.dome.projections to have details about contour lines.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
 
 #Saved simulation
 data(data_sim_RegNeg)
 graph.simul.triangle.diagram.e(data_sim_RegNeg, new.window=TRUE, add.line.eq.eff=TRUE)
 
 
 #add curve lines
 data(data_sim_Comp)
 graph.simul.triangle.diagram.e(data_sim_Comp,new.window=TRUE,add.curve.lines=TRUE)
 
 #all options
 data(data_sim_CRNeg)
 graph.simul.triangle.diagram.e(data_sim_CRNeg,new.window=TRUE,add.curve.lines=TRUE,
 add.line.eq.eff=TRUE)
 
 
 
 
 #New simulation
# 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,npt=250,
is.random.E0=TRUE,same.E0=FALSE)
graph.simul.triangle.diagram.e(evol_sim, new.window=TRUE, add.line.eq.eff=TRUE)

#add curve lines 
nsim <- 3
correl <- "Comp"
evol_sim <- simul.evol.enz.multiple(E0,kin,Keq,nsim,N,correl,beta,npt=250,
is.random.E0=TRUE,same.E0=FALSE)
graph.simul.triangle.diagram.e(evol_sim,new.window=TRUE,add.curve.lines=TRUE)

#all options
correl <- "CRNeg"
evol_sim <- simul.evol.enz.multiple(E0,kin,Keq,nsim,N,correl,beta,npt=250,
is.random.E0=TRUE,same.E0=FALSE)
graph.simul.triangle.diagram.e(evol_sim,new.window=TRUE,add.curve.lines=TRUE,add.line.eq.eff=TRUE)

#several enzyme
n <- 5
E0 <- c(30,30,30,30,30)
kin <- c(1,10,30,100,1000)
Keq <- c(1,1,1,1,1)
correl <- "SC"
evol_sim <- simul.evol.enz.multiple(E0,kin,Keq,nsim,N,correl,beta,npt=250)
graph.simul.triangle.diagram.e(evol_sim,new.window=TRUE)

SimEvolEnzCons documentation built on Oct. 29, 2021, 1:07 a.m.