Description Usage Arguments Details Value Author(s) See Also Examples

View source: R/plotOptimResultsPDF.R

This is a wrapper for `plotOptimResults`

1 2 | ```
plotOptimResultsPDF(simResults, expResults, times, namesCues, namesSignals,
valueCues, filename, formalism="new")
``` |

`simResults` |
a list with a field for each time point, each containing a matrix of dimensions number of conditions * number of signals, with the first field being t0. Typically produced by simulating a model and then extracting the columns that correspond to signals |

`expResults` |
same as above, but contains the experimental results, ie this is |

`times` |
a vector of times, its length should be the same as the number of fields in simResults and ExpResults |

`namesCues` |
a vector of names, typically |

`namesSignals` |
a vector of names, typically |

`valueCues` |
a matrix of dimensions (number of conditions) * (number of cues), typically |

`filename` |
a name for your file, eg. "plot.pdf" |

`formalism` |
New convention is to take the time=0 data set into account to compute the MSE. you can use the previous convetion by setting this argument to something different from the default value. |

The coloring of the background is done as follows: the mean absolute difference between observed and simulated values are computed, and colours are chosen based on this value: red (above 0.9), indianred1 (between O.8 and 0.9), lightpink2 (between 0.7 and 0.8), lightpink (between 0.6 and 0.7), mistyrose (between 0.5 and 0.6), palegoldenrod (between 0.4 and 0.5), palegreen (between 0.3 and 0.4), darkolivegreen3 (between 0.2 and 0.3), chartreuse3 (between 0.1 and 0.2), forestgreen (between 0 and 0.1). This function is used inside `cutAndPlotResultsT1`

.

This function doesn't return anything, it just produces a plot in a pdf document in your working directory.

C. Terfve

plotOptimResults, cutAndPlotResultsT1

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 | ```
tmpdir<-tempdir()
setwd(tmpdir)
#We will plot the fit of the full initial model compared to the data, without any optimisation
#This is normally not done on a stand alone basis, but if you have a model and would like to visualise
#its output compared to your data, then this is what you should do
#load and prepare data
data(CNOlistToy,package="CellNOptR")
data(ToyModel,package="CellNOptR")
indicesToy<-indexFinder(CNOlistToy,ToyModel,verbose=TRUE)
ToyFields4Sim<-prep4sim(ToyModel)
#simulate the model
simRes<-simulatorT1(CNOlist=CNOlistToy,model=ToyModel,simList=ToyFields4Sim,indexList=indicesToy)
#format the results and data as expected by plotOptimResults
simResults<-list(t0=matrix(data=0,nrow=dim(simRes)[1],ncol=dim(simRes)[2]),t1=simRes)
expResults<-list(t0=CNOlistToy$valueSignals[[1]],t1=CNOlistToy$valueSignals[[2]])
#plot
plotOptimResultsPDF(
simResults=simResults,
expResults=expResults,
times=CNOlistToy$timeSignals[1:2],
namesCues=CNOlistToy$namesCues,
namesSignals=CNOlistToy$namesSignals,
valueCues=CNOlistToy$valueCues,
filename="Toyfull.pdf")
``` |

CellNOptR documentation built on May 2, 2018, 4:23 a.m.

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.