View source: R/generateRandomNKNetwork.R
generateRandomNKNetwork | R Documentation |
Generates a random N-K Boolean network (see Kauffman, 1969) using different configurations for the topology, the linkage, and the functions.
generateRandomNKNetwork(n, k,
topology = c("fixed", "homogeneous", "scale_free"),
linkage = c("uniform", "lattice"),
functionGeneration = c("uniform", "biased"),
validationFunction, failureIterations=10000,
simplify = FALSE, noIrrelevantGenes=TRUE,
readableFunctions = FALSE,
d_lattice = 1, zeroBias = 0.5,
gamma = 2.5, approx_cutoff = 100)
n |
The total number of genes in the network |
k |
If this is a single number, this is either the maximum number of genes in the input of a transition function (for |
topology |
If set to "fixed", all transition functions of the network depend on exactly If set to "homogeneous", the number of input genes is drawn independently at random from a Poisson distribution with lambda = k. If set to "scale_free", the number of input genes of each function is drawn from a Zeta distribution with parameter |
linkage |
If this parameter is "uniform", the actual input genes are drawn uniformly at random from the total If set to "lattice", only genes from the neighbourhood |
functionGeneration |
This parameter specifies how the truth tables of the transition functions are generated.
If set to "uniform", the truth table result column of the function is filled uniformly at random with 0 and 1. If set to "biased", a bias is introduced, where the probability of drawing a 0 is determined by the parameter As a third option, |
validationFunction |
An optional function that restricts the generated Boolean functions to certain classes. This can be used if no explicit generation function can be specified in |
failureIterations |
The maximum number of iterations the generator tries to generate a function that is accepted by |
simplify |
If this is true, |
noIrrelevantGenes |
If set to true, gene transition functions are not allowed to contain irrelevant genes, i.e. the functions have exactly the number of input genes determined by the |
readableFunctions |
This parameter specifies if readable DNF representations of the transition function truth tables are generated and displayed when the network is printed. If set to FALSE, the truth table result column is displayed. If set to "canonical", a canonical Disjunctive Normal Form is generated from each truth table. If set to "short", the canonical DNF is minimized by joining terms (which can be time-consuming for functions with many inputs). If set to TRUE, a short DNF is generated for functions with up to 12 inputs, and a canonical DNF is generated for functions with more than 12 inputs. |
d_lattice |
The dimension parameter for the lattice if |
zeroBias |
The bias parameter for biased functions for |
gamma |
The Gamma parameter of the Zeta distribution for |
approx_cutoff |
This parameter is only used with |
The function supports a high number of different configurations to generate random networks. Several of the parameters are only needed for special configurations. The generated networks have different structural properties. Refer to the literature for more details.
Constant genes are automatically fixed (e.g. knocked-out or over-expressed). This means that they are always set to the constant value, and states with the complementary value are not considered in transition tables etc. If you would like to change this behaviour, use fixGenes
to reset the fixing.
An object of class BooleanNetwork
containing the generated random network. The class BooleanNetwork
is described in more detail in loadNetwork
.
S. A. Kauffman (1969), Metabolic stability and epigenesis in randomly constructed nets. J. Theor. Biol. 22:437–467.
S. A. Kauffman (1993), The Origins of Order. Oxford University Press.
M. Aldana (2003), Boolean dynamics of networks with scale-free topology. Physica D 185: 45–66.
M. Aldana and S. Coppersmith and L. P. Kadanoff (2003), Boolean dynamics with random coupling. In E. Kaplan, J. E. Marsden and K. R. Sreenivasan (editors): Perspectives and Problems in Nonlinear Science, Springer.
perturbNetwork
,loadNetwork
, simplifyNetwork
, fixGenes
## Not run:
# generate different random networks
net1 <- generateRandomNKNetwork(n=10, k=10,
topology="scale_free",
linkage="uniform",
functionGeneration="uniform",
noIrrelevantGenes=FALSE,
simplify=TRUE)
net2 <- generateRandomNKNetwork(n=10, k=3,
topology="homogeneous",
linkage="lattice",
functionGeneration="uniform",
d_lattice=1.5,
simplify=TRUE)
net3 <- generateRandomNKNetwork(n=10, k=2,
topology="fixed",
linkage="uniform",
functionGeneration="biased",
noIrrelevantGenes=FALSE,
zeroBias=0.6)
# get attractors
print(getAttractors(net1))
print(getAttractors(net2))
print(getAttractors(net3))
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.