Learn R Programming

BacArena (version 1.0.1)

getPhenoMat: Function for getting a matrix of phenotypes from the dataset

Description

The generic function getPhenoMat reconstructs a matrix with the usage of exchange reactions of the different organisms in the environment.

Usage

getPhenoMat(object, time = "total", sparse = F)
"getPhenoMat"(object, time = "total", sparse = F)

Arguments

object
An object of class Eval.
time
An integer indicating the time step to be used (default value is character "total")
sparse
A boolean indicating whether zero entries should be removed from return matrix

Value

Returns a matrix with different phenotypes of the organism as rows and all possible exchange reactions as columns. A value of 1 means secretion, 2 means uptake and 0 means no usage of the substance of interest.

Details

The phenotypes are defined by flux through exchange reactions, which indicate potential differential substrate usages.

See Also

Eval-class and getPhenotype

Examples

Run this code
data(Ec_core, envir = environment()) #get Escherichia coli core metabolic model
bac <- Bac(Ec_core,deathrate=0.05,
           growthlimit=0.05,growtype="exponential") #initialize a bacterium
arena <- Arena(n=20,m=20) #initialize the environment
addOrg(arena,bac,amount=10) #add 10 organisms
addSubs(arena,40) #add all possible substances
eval <- simEnv(arena,10)
phenmat <- getPhenoMat(eval)

Run the code above in your browser using DataLab