This function provides a simple interface to generate full state vectors by specifying only the genes of interest. For example, only those genes that are active can be specified, while the others are set to a default value.
generateState(network, specs, default =0)
Arguments
network: An network of class BooleanNetwork, SymbolicBooleanNetwork or ProbabilisticBooleanNetwork for which a state is generated.
specs: A named vector or list specifying the genes to be set. Here, the names of the elements correspond to the gene names, and the elements correspond to the gene values. The function can also generate a matrix of states if the elements of specs are vectors of values (of the same length).
default: The default value used for the unspecified genes (usually 0).
Returns
Returns a full state vector with one entry for each gene of the network, or a matrix with one state in each row if specs contains vectors of state values.
## Not run:# load cell cycle networkdata(cellcycle)# generate a state in which only CycD and CycA are activestate <- generateState(cellcycle, c("CycD"=1,"CycA"=1))print(state)# use the state as a start state for attractor searchprint(getAttractors(cellcycle, startStates=list(state)))## End(Not run)