generateState: Generate a state vector from single gene values

View source: R/generateState.R

generateStateR Documentation

Generate a state vector from single gene values

Description

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.

Usage

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).

Value

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.

See Also

getAttractors, simulateSymbolicModel, stateTransition

Examples

## Not run: 
# load cell cycle network
data(cellcycle)

# generate a state in which only CycD and CycA are active
state <- generateState(cellcycle, c("CycD"=1, "CycA"=1))
print(state)

# use the state as a start state for attractor search
print(getAttractors(cellcycle, startStates=list(state)))

## End(Not run)

BoolNet documentation built on Oct. 2, 2023, 5:08 p.m.