Description Usage Arguments Details See Also Examples
The generic function createGradient
changes specific substance concentration patterns in the environment.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | createGradient(
object,
mediac,
position,
smax,
steep,
add = FALSE,
unit = "mmol/cell"
)
## S4 method for signature 'Arena'
createGradient(
object,
mediac,
position,
smax,
steep,
add = FALSE,
unit = "mmol/cell"
)
|
object |
An object of class Arena. |
mediac |
A character vector giving the names of substances, which should be added to the environment (the default takes all possible substances). |
position |
A character vector giving the position (top, bottom, right and left) of the gradient. |
smax |
A number giving the maximum concentration of the substance. |
steep |
A number between 0 and 1 giving the steepness of the gradient (concentration relative to the arena size). |
add |
A boolean variable defining whether the amount of substance should be summed or replaced |
unit |
A character used as chemical unit to set the amount of the substances to be added (valid values are: mmol/cell, mmol/cm2, mmol/arena, mM) |
This function can be used to add gradients of specific substances in the environment.
Arena-class
and changeSub
1 2 3 4 5 6 7 8 | data(Ec_core, envir = environment()) #get Escherichia coli core metabolic model
bac <- Bac(Ec_core,deathrate=0.05,
minweight=0.05,growtype="exponential") #initialize a bacterium
arena <- Arena(n=20,m=20) #initialize the environment
arena <- addOrg(arena,bac,amount=10) #add 10 organisms
arena <- addSubs(arena,30) #add all substances with no concentrations.
arena <- createGradient(arena,smax=50,mediac=c("EX_glc(e)","EX_o2(e)","EX_pi(e)"),
position='top',steep=0.5, add=FALSE)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.