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

createGradientR Documentation

Change substance concentration patterns in the environment according to a gradient

Description

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

Usage

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

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)

euba/BacArena documentation built on March 27, 2024, 2:33 p.m.