addSpecies: Adding species

Description Usage Arguments Value Examples

Description

This function allows users to specify initial values for species within the model. Model must contain at least one species. Initial values for all species, as well as all rates and parameters have to be defined. sysBio uses a term null to describe a null species (source or sink); null species do not need to be defined.

Usage

1
addSpecies(x, spName = NA, iVal = "0", overwrite = FALSE)

Arguments

x

model to which the species is added (required)

spName

species name (required)

iVal

initial value; if the value is not specified, sysBio will set initial value to 0

overwrite

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

Value

This function adds information about species into the model (given as a first argument of the function). Species 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
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)
  
# Show info about model reactions and species
exmp$reaction
exmp$species

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