expandGates: Expand the gates of a model

Description Usage Arguments Details Value Note Author(s) Examples

View source: R/expandGates.R

Description

This function takes in a model and (1) splits all AND gates into ORs. In addition, (2) wherever there are more than one, it creates all possible ANDs combinations of them, but considering only ANDs with 2, 3 or 4 inputs according to the user argument (default is 2)

Usage

1
expandGates(model, ignoreList=NA, maxInputsPerGate=2)

Arguments

model

a model structure

ignoreList

an index vector of states to ignore incoming edges during step (1), i.e. at the time of splitting up AND gates

maxInputsPerGate

maximum number of input per gates (Default is 2; up to 4)

Details

This function returns a model with additional fields that help keep track of the processing done on the network. I would advice not to overwrite on the initial model but rather to assign the result of this function to a variable with a different name.

Value

returns a model, with additional fields:

SplitANDs

list that contains a named element for each AND reac that has been split, and each element contains a vector with the names of the of the reactions that result from the split if nothing was split, this element has the default value $initialReac [1] "split1" "split2"

newANDs

list that contains an element for each new '&' gate, named by the name of this new and reac, and containing a vector of the names of the reactions from which it was created (contains all the reacs in that pool, not the particular ones, this could be improved)

Note

No need to call this function directly since version 0.99.24. Use preprocessing instead.

Author(s)

C.Terfve. T. Cokelaer, A.MacNamara, Martin-Franz-Xaver Pirkl

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
#load data

data(CNOlistToy,package="CellNOptR")
data(ToyModel,package="CellNOptR")

#pre-process the model

indicesToy<-indexFinder(CNOlistToy,ToyModel,verbose=TRUE)
ToyNCNOindices<-findNONC(ToyModel,indicesToy,verbose=TRUE)
ToyNCNOcut<-cutNONC(ToyModel,ToyNCNOindices)
indicesToyNCNOcut<-indexFinder(CNOlistToy,ToyNCNOcut)
ToyNCNOcutComp<-compressModel(ToyNCNOcut,indicesToyNCNOcut)
indicesToyNCNOcutComp<-indexFinder(CNOlistToy,ToyNCNOcutComp)
ToyNCNOcutCompExp<-expandGates(ToyNCNOcutComp, maxInputsPerGate=4)

CellNOptR documentation built on Nov. 8, 2020, 6:58 p.m.