createGradient: Change substance concentration patterns in the environment...

Description Usage Arguments Details See Also Examples

Description

The generic function createGradient changes specific substance concentration patterns in the environment.

Usage

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

Arguments

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)

Details

This function can be used to add gradients of specific substances in the environment.

See Also

Arena-class and changeSub

Examples

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)

BacArena documentation built on July 2, 2020, 3:16 a.m.