addRule: Adding rules

Description Usage Arguments Value Examples

Description

This function allows user to define rules. Rules can be used to specify values for model species based on the values of other components (mainly species) in the model. Current version allows only for the ODEs type of rules.

Usage

1
addRule(x, rName = NA, type = NA, rule = NA, overwrite = FALSE)

Arguments

x

model to which the rule is added (required)

rName

- rule name (required)

type

rule type; currently only type ODEs is supported (rules in the form of ODEs) (required)

rule

rule definition (required)

overwrite

a flag that allows changes to the existing rule (default value FALSE)

Value

This function adds information about rules into the model (given as a first argument of the function). Rules information is stored in the list format and contain the following elements:

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
exmp <- newModel("This is an example of a new model")
addMAreaction(exmp, react="A = null", "rf", "rb")
addMAreaction(exmp, react="A + B -> 2*AB", "k", name="Forward AB")
addMAreaction(exmp, react="AB -> null", "rAB")

addMAreactRate(exmp, "rf", "fixed", "1")
addMAreactRate(exmp, "rb", "fixed", "0.75")
addMAreactRate(exmp, "k", "fixed", "0.5")
addMAreactRate(exmp, "rAB", "assigned", "p1*A")

addParameters(exmp, "p1", 0.75)
 
addSpecies(exmp, "A", 10)
addSpecies(exmp, "B", 10)
addSpecies(exmp, "AB", 0)

addRule(exmp, "rule B", "ODEs", "B=-0.1*AB")
  
# Show info about model reactions and rules
exmp$reaction
exmp$rule

Vessy/sysBio documentation built on May 9, 2019, 9:55 p.m.