mkSpurs {ccems} | R Documentation |
This function takes g
from mkg
and maps it into a dataframe of spur graph model definitions.
mkSpurs(g,state=list(globMdlIndex=0,globCmbIndex=0,relCmbIndex=0, config=NULL), maxnKjPs=NULL, maxTotalPs=NULL, batchSize=500, pRows=FALSE, doTights=FALSE,atLeastOne=TRUE,IC=1,kIC=1)
g |
The generic model output list of mkg . |
state |
The current state of model space generation. This is a list with several components.
globMdlIndex is the global model space index.
When mkSpurs is called within ems the globMdlIndex of
the spurs begins where the globMdlIndex for grids end.
globCmbIndex is the global spur model index.
This index is used to trim the last batchSize , if needed, to avoid attempts
to extend the spur space size beyond its upper limit of 2^g$nZ .
relCmbIndex is the most critical component of the state .
This is the column number of
the current matrix output of combn , i.e. it is a relative index.
The spur space chunk returned by mkSpurs begins just after this column.
config is a vector of the integer positions in g$Z of the
last model's finite K (i.e. the last model of the previous
chunk). config is
the relCmbIndex th column of the current combn matrix.
Its length is the current number of K parameters in the model unless relCmbIndex=0 ,
in which case the number of
parameters is one more than this
(in this case the end of the last batch coincides with the end of a combn matrix). |
maxnKjPs |
The maximum number of Kj parameters of models in the model space. Full chunks are created and then trimmed, so descreases in the value of this option will not solve "out of memory" problems. |
maxTotalPs |
This is the maximum number of freely estimated k or K parameters. |
batchSize |
This is the number of K infinity models fitted per batch. Chunk sizes
are bigger than this if doTights is TRUE and/or
if pRows is TRUE , and/or if activity parameter constraints
split models further. Values less than ~1000 are recommended for
quad core 8 GB motherboards. |
pRows |
Set to TRUE if additional rows are to be added to the output dataframe
to include models with p (the proportion of undamaged/functional protein)
freely estimated. |
doTights |
This should be TRUE if infinitely tight binding models
of single edge spur graphs are to be created. |
atLeastOne |
Leave TRUE if only models with at least one complex
of maximal size are to be considered. Set FALSE if there is no
prior knowledge supportive of the assertion that the largest oligomer must be in the model. |
IC |
The initial condition of all K parameters optimized. The default is IC=1 (in uM). |
kIC |
The initial condition of all k parameters optimized. The default is kIC=1 (in 1/seconds per occupied active site). |
This function is complicated by the fact that one readily runs out of memory
with 29 complexes and thus roughly 500,000,000 spur models (in this case 8 GB RAM
allows at most 16 bytes per model!).
Thus, chunks of the spur model space must be created, fitted and summarized in sizes
small enough to fit into memory.
As both an input and an output, state
links successive calls to this function.
It keeps track of where we are in the spur graph model space and it allows searches through
the low parameter number models without first defining all of the higher
parameter number models (and thus consuming all of the RAM in the process).
A list with components
chunk |
A dataframe where each row is a spur model. |
state |
The state, defined in the same way as the input argument state
since the output state of one call is
the input state of the next call. |
maxReached |
This is TRUE if the maximum number of parameter has been reached. |
lastCompleted |
When all of the models with j K parameters have
been specified, lastCompleted equals j.
This is useful in ems when smart = TRUE as it defines how far into the
model space the fitting process has gone so far in terms of numbers of model parameters. |
This work was supported by the National Cancer Institute (K25CA104791).
Tom Radivoyevitch (txr24@case.edu)
Radivoyevitch, T. (2008) Equilibrium model selection: dTTP induced R1 dimerization. BMC Systems Biology 2, 15.
library(ccems) topology <- list( heads=c("R1t0","R2t0"), sites=list( s=list( # s-site thread # m=c("R1t1"), # monomer 1 d=c("R2t1","R2t2") # dimer 2 ) ) ) g <- mkg(topology,TCC=TRUE) mkSpurs(g,pRows=TRUE,doTights=TRUE)