Learn R Programming

Title: BacArena: Agent based modeling framework for cellular communities
Author: Eugen Bauer and Johannes Zimmermann

BacArena


BacArena is an agent based modeling framework for cellular communities.

Existing genome-scale metabolic models can be used to simulate growth and interactions in time and space. In BacArena two well established methods are merged: a) Flux balance analysis to predict the activity of metabolic reactions and b) Agent based modelling in order to provide an environment.

It has been efficiently implemented in R language (with some C++ routines) and is freely available CRAN.

Features:

  • Each organism is represented individually
  • Simulation of >10 different species and thousands of organisms on your desktop computer
  • Diffusion of substances
  • Screening of phenotypes
  • Detection of crossfeeding
  • Chemotaxis
  • Kinetics of reactions
  • Separation of simulation and evaluation
  • Rich evaluation methods (data mining)
  • Reproducible simulations
  • Object oriented implementation
  • Easily expandable due to rule based approach

Installation

  • Install the latest CRAN release:
install.packages("BacArena")
  • Install the development version:
library(devtools)
install_github("euba/bacarena")
  • Special hints for linux user:

    • glpk header files needed, e.g. for debian install package: libglpk-dev
  • Special hints for windows user:

    • Besides R you need to install Rtools

Quick start

library("BacArena")
openArena()

matlab models

  • cobra matlab model files can be imported
  • tutorial
readMATmod("model.mat")

SBML support

  • sybilSBML is needed for SBML input
  • currently sybilSBML is not available on CRAN because the CRAN test servers do not have the latest version of libsbml yet
  • manual installation of sybilSBML (for linux):
wget https://www.cs.hhu.de/fileadmin/redaktion/Oeffentliche_Medien/Fakultaeten/Mathematisch-Naturwissenschaftliche_Fakultaet/Informatik/Bioinformatik/sybilSBML_3.0.5.tar.gz
R CMD INSTALL  sybilSBML_3.0.5.tar.gz

Documentation

Issues

Please report bugs, disorders or features you would like to see: Issues

Copy Link

Version

Install

install.packages('BacArena')

Monthly Downloads

111

Version

1.8.2

License

GPL-3 | file LICENSE

Maintainer

Johannes Zimmermann

Last Published

May 20th, 2020

Functions in BacArena (1.8.2)

Arena-class

Structure of the S4 class "Arena"
Human-constructor

BacArena

BacArena: An Agent-Based Modeling Framework for Cellular Communities
NemptyHood

Function to check if the there is a free place in the Moore neighbourhood
Bac-Constructor

Bac-class

Structure of the S4 class "Bac"
Arena-constructor

Human-class

Structure of the S4 class "Human"
Eval-constructor

Substance-constructor

Constructor of the S4 class Substance
addDefaultMed

Add default medium of an organism to arena.
checkCorr

Function to show correlations of a simulated organism or substrate
getArena

Function for re-constructing an Arena object from a simulation step
diffuse

Function for diffusion
checkPhen

Function for checking phenotypes in the environment
diffusePDE

Function for diffusion of the Substance matrix
getCorrM

Function to compute and return correlation matrix
addEssentialMed

Add minimal medium of an organism to arena.
cellgrowth

Function implementing a growth model of a human cell
addSubs

Add substances to the environment
addEval

Function for adding a simulation step
changeOrg

Change organisms in the environment
colpal1

Color palette
colpal2

Color palette
changeSub

Change substances in the environment
getSubHist

Function to get timeline of a substance
findFeeding

Function for investigation of feeding between phenotypes
colpal4

Color palette
extractMed

Function for re-constructing a medium concentrations from simulations
findFeeding2

Function for investigation of feeding between phenotypes
lysis

Lysis function of organismal cells by adding biomass_compounds to the medium
getSublb

Function for calculated the substrate concentration for every organism
addOrg

Add individuals to the environment
colpal3

Color palette
minePheno

Function for mining/analyzing phenotypes which occured on the arena
Substance-class

Structure of the S4 class "Substance"
createGradient

Change substance concentration patterns in the environment according to a gradient
Eval-class

Structure of the S4 class "Eval"
Organism-class

Structure of the S4 class "Organism"
plotPhenCurve

Plot growth curve for several simulations
Organism-constructor

plotPhenNum

Plot number of phenotypes curve for several simulations
changeDiff

Change substance concentration patterns in the environment
plotTotFlux

Function for plotting the overall change in reaction activity
dat2mat

Function for transforming the organism data frame to a presence/absence matrix of organisms
readMATmod

Read matlab model
changeFobj

Function for changing the objective function of the model
findInArena

Function for searching a keyword in arena organisms and media
colpal6

Color palette
growth_par

Function implementing a growth model of a bacterium
findFeeding3rep

Function for investigation of cross feeding patterns of replicate simulations
chemotaxis

Function for chemotaxis of bacteria to their prefered substrate
checkPhen_par

Function for checking phenotypes in the environment
lsd

Computer standard deviation lower bound
plotCurves

Function for plotting the overall change as curves
colpal5

Color palette
plotCurves2

Function for plotting the overall change as curves with maximally distinct colors
rmSubs

Remove substances
consume

Function to account for the consumption and production of substances
evalArena

Function for plotting spatial and temporal change of populations and/or concentrations
emptyHood

Function to check if the there is a free place in the Moore neighbourhood
constrain

Function for constraining the models based on metabolite concentrations
findrBiomass

Find biomass reaction in model
diffuse_par

Function for parallelzied diffusion
move

Function for random movement of organisms
diffuseR

Function for naive diffusion (neighbourhood) of the Substance matrix
findRxnFlux

Function to get all reactions fluxes that are associated with the metabolite of a given exchange reactions
findFeeding3

Function for investigation of feeding between phenotypes
openArena

Start simulation
growLin

Function for letting organisms grow linearly
fluxVarSim

Function to compute flux variability analysis on an simulation object to get min/max of substance usage
flushSubs

Remove all substances in the environment
selPheno

Function for selecting phenotypes which occured on the arena from specific iterations and species
plotInterNum

Plot number of variation in number of interactions for several simulations
getVarSubs

Function to get varying substances
plotGrowthCurve

Plot growth curve for several simulations
plotSubVar

Plot substance variations
plotSubUsage

Function to plot usage of substances species wise
growExp

Function for letting organisms grow exponentially
optimizeLP

Function for computing the linear programming according to the model structure
simBac

Function for one simulation iteration for objects of Bac class
plotSubDist

Function to overview the spatial distribution of a substance over time.
growth

Function implementing a growth model of a bacterium
plotSubDist2

Function to overview the spatial distribution of a substance over time.
setKinetics

Function to set Michaelis-Menten kinetics for uptake of a substance
getPhenotype

Function to extract the phenotype of an organism object
plotAbundance

Plot abundances of species
plotFluxVar

Plot population flux variations
plotFVA

Function to plot population level minimum and maximum flux from alternative optimal solutions obtained by FVA
getPhenoMat

Function for getting a matrix of phenotypes from the dataset
plotSpecActivity

Function to plot substance usage for every species
plotSubCurve

Plot substance curve for several simulations
plotReaActivity

Function to plot reaction activity for every species
plotShadowCost

Function to plot substance shadow costs for a specie
redEval

Function for reducing the size of an Eval object by collapsing the medium concentrations
reset_screen

Reset plotting screen
stirEnv

Function for stirring/mixing the complete evironment
statPheno

Function for investigating a specific phenotype of an organism
simHum

Function for one simulation iteration for objects of Human class
sihumi_test

Multi-species test data set
simBac_par

Function for one simulation iteration for objects of Bac class
usd

Computer standard deviation upper bound
simEnv_par

Main function for simulating in parallel all processes in the environment
simEnv

Main function for simulating all processes in the environment
unit_conversion

Function for unit conversion