mkGrids {ccems} | R Documentation |
This function takes g
from mkg
and maps it into a
dataframe of grid model definitions. It also augments and returns the input list g
.
mkGrids (g,maxTotalPs=NULL,minTotalPs=NULL,contig=TRUE, atLeastOne=TRUE,atLeastOneOfEach=FALSE, KIC=1,kIC=1,fullGrid=FALSE, m1=-90,p=-1,forceM1=FALSE,forceP=FALSE)
g |
The output of mkg . |
maxTotalPs |
The maximum number of parameters of models in the model space.
If NULL all models are found (but see fullGrid below). |
minTotalPs |
The minimum number of parameters of models in the model space.
If NULL no minimum is imposed. |
contig |
Set to TRUE to allow Kd equalities of threads only in contiguous runs. Tentatively,
this should always be TRUE . |
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. |
atLeastOneOfEach |
Set TRUE if only models with at least one complex
of each oligomer size are to be considered. This is useful when the data are multivariate
proportions (i.e. mass distribution data) and each j-mer is clearly present. |
KIC |
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). |
fullGrid |
Set TRUE if a full binary K model is wanted, else grids that are
equivalent to spurs are eliminated from the model space.
This is used to obtain grid reparameterizations of full spur models to
form model averages across common binary K parameters. |
m1 |
The hub protein's monomer mass in kDa. The default is 90 for the big (R1) subunit of ribonucleotide reductase (RNR). This only matters if the data is mass data. Negative numbers imply fixed values and positive numbers imply starting values to be fitted to the data. |
p |
Probability that hub can oligomerize, i.e. is not damaged.
Set to a positive value if additional rows are to be added to the output dataframe to include models
with p freely estimated. Set negative to hold fixed. Value is the initial or fixed value. |
forceM1 |
Set TRUE to force all models to estimate M1, i.e. to not generate models with M1 fixed. |
forceP |
Set TRUE to force all models to estimate p, i.e. to not generate models with fixed p. |
In a run of equal threads, the first head node of the run is the leader (optimized parameter) and the remaining nodes in the run are followers
(i.e. constrained to track the leader in parameter estimate optimizations);
a default in ems
is that only leader estimates are reported in html
in the results
subdirectory.
In contrast to its counterpart mkSpurs
, a means of traversing
the grid model space incrementally with increasing numbers of parameters remains to be
found and implemented, i.e.
mkGrids
does not have state
inputs and outputs and the whole space is found in one batch.
When this drawback
limits research due to too much memory usage,
attempts will be made to identify an approach that, similar to what has been implemented for
mkSpurs
, specifies
chunks of grid models, fits them, and then specifies the next chunk
based on knowledge of where the previous chunk stopped.
Note that setting
maxTotalPs
to smaller values will not help this foreseen memory problem
as the entire grid model space dataframe is first generated
and then, only later, truncated to maxTotalPs
.
A list with components
chunk |
The entire K equality model space requested by the arguments.
In this dataframe each row specifies a model. If the activity field of g is TRUE
this dataframe includes k columns. The row names encode the equality constraints.
Therein . separates K models from k models, I stands for infinity,
J stands for freely estimated (in spur components), and other letters are the same when
parameters that correspond to their positions equal each other.
Unmatched other letters are freely estimated and thus just like J's but in
k and binary K components of the model names.
|
Keqs |
A list of K equality constraints indexed by model names where each element is a vector of character strings whose names are followers and values are leaders. |
keqs |
Similar to Keqs but for activity constraints. This is NULL if
activity in g is FALSE . |
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) gridL <- mkGrids(g) print(gridL$chunk) topology <- list( heads=c("R1X0","R2X2","R4X4","R6X6"), sites=list( # s-sites are already filled only in (j>1)-mers a=list( #a-site thread m=c("R1X1"), # monomer 1 d=c("R2X3","R2X4"), # dimer 2 t=c("R4X5","R4X6","R4X7","R4X8"), # tetramer 3 h=c("R6X7","R6X8","R6X9","R6X10", "R6X11", "R6X12") # hexamer 4 ), # tails of a-site threads are heads of h-site threads h=list( # h-site m=c("R1X2"), # monomer 5 d=c("R2X5", "R2X6"), # dimer 6 t=c("R4X9", "R4X10","R4X11", "R4X12"), # tetramer 7 h=c("R6X13", "R6X14", "R6X15","R6X16", "R6X17", "R6X18")# hexamer 8 ) ) ) g <- mkg(topology) gridL <- mkGrids(g,maxTotalPs=2) print(gridL$chunk) gridL <- mkGrids(g,maxTotalPs=4) # the next line should be run separately since its output is large. # print(gridL$chunk)