Learn R Programming

microPop (version 1.6)

Process-Based Modelling of Microbial Populations

Description

Modelling interacting microbial populations - example applications include human gut microbiota, rumen microbiota and phytoplankton. Solves a system of ordinary differential equations to simulate microbial growth and resource uptake over time. This version contains network visualisation functions.

Copy Link

Version

Install

install.packages('microPop')

Monthly Downloads

217

Version

1.6

License

GPL-3 | file LICENSE

Maintainer

Helen Kettle

Last Published

February 3rd, 2022

Functions in microPop (1.6)

Methanogens

Methanogens dataframe
Acetogens

Acetogens dataframe
NoButyFibreDeg

NoButyFibreDeg dataframe
Bacteroides

Bacteroides dataframe
ButyrateProducers2

ButyrateProducers2 dataframe
ButyrateProducers1

ButyrateProducers1 dataframe
NoButyStarchDeg

NoButyStarchDeg dataframe
ButyrateProducers3

ButyrateProducers3 dataframe
MFG

Microbial Functional Group (MFG) dataframes
PropionateProducers

PropionateProducers dataframe
LactateProducers

LactateProducers dataframe
derivsDefault

Differential Equations called by ODE solver
createDF

Create a dataframe from a CSV file
Xsu

Xsu dataframe
Xh2

Xh2 dataframe
extraGrowthLimFuncDefault

Extra Growth Limitation Function
entryRateFuncDefault

entry Rate Function
assignStrainTraits

Internal function to assign stochastic strain traits
applyTraitTradeOffs

Internal function to trade off one trait against another (used when assigning randomly generated strain traits)
assignNAsToMFGs

Assigns NA to the MFG data frames for parameter values that are not used Even though these values are not used it is important that they are NAs when assigning random strain values It alters the global variables that are the MFG dataframes
getVNPlotObject

getVNPlotObject
getValues

get system quantity (e.g. startValue, inflowRate, washOut) for all state variables (convention is that microbes are before resources)
makeParamMatrixS

Gets parameter values for parameters halfSat, yield and maxGrowthRate from the MFGs and puts into a matrix also assigns strain traits since traits are assigned to all strains at once for one param they are stored in Mat[strain,res,path], this is then rearranged to make a matrix for each strain (mat[path,res]).
checkSolution

Checks whether the solution generated by the ODE solver contains negative values
microPopModel

Runs the microbial population model
getAllResources

Makes vector of unique resource names
Xaa

Xaa dataframe
getKeyRes

Finds the name of the key resource for each path for each MFG
checkStoichiom

Checks whether the stoichiometries in each MFG conserve mass within a specified tolerance If they do not then if reBalanceStoichiom=TRUE the stoichiometry will be adjusted
checkResInfo

Checks whether the all the resources needed are included in the system information file (e.g. start value, washout rate etc)
combinePathsFuncDefault

Combine microbial growth on different pathways by one microbe
combineGrowthLimFuncDefault

combines the growth limitation functions and max growth rates to get the growth rate of strain
pHcentreOfMass

Find the pH value which is the centre of mass of the pH limitation function (used for the pH trait)
massBalanceFuncDefault

mass balance Function
convertStatesToMoles

convertStatesToMoles
convertFlowsToMoles

convertFlowsToMoles
getPHcorners

get pH corners Function
rateFuncsDefault

List of functions that are used by the ODE solver these functions can be changed by the user but all must be listed.
growthLimFuncDefault

growth rate limitation function
getNumPaths

get the number of metabolic pathways for the given group
removalRateFuncDefault

Removal Rate Function
makeInflowFromSoln

Used for running microPop with multiple compartments Takes the solution (state of system) from the previous compartment (out$solution) and then finds the washout rate of each state variable using removalRateFunc to find the inflow rate to the next downstream compartment
plotResources

Generic plotting of resources over time
plotTraitChange

plot changes in trait over time
microbeSysInfo

microbeSysInfo
makeNetworkMatrices

makeNetworkMatrices
quickPlot2

Generic plotting showing results of microPop Now shows resources and microbes on one plot.
networkDFfromMPinput

networkDFfromMPinput
microbeSysInfoHuman

microbeSysInfoHuman dataframe
quickPlot1

Generic plotting showing results of microPop
replaceListItems

used to replace items in list.in in list.default needed for processing microPop input args like plotOptions
networkDFfromMPoutput

networkDFfromMPoutput
getNonBoostFrac

obtains the none boosting fraction of growth for given MFG if there is a boosting resource
reshapeFlowMat

reshapeFlowMat
plotMicrobes

Generic plotting of microbes over time
microbeSysInfoRumen

microbeSysInfoRumen dataframe
getGroupName

Convert strain name to its group name e.g. 'Bacteroides.1' becomes 'Bacteroides' updated (Dec 2019) so that MFG names can contain dots
sumConcOverStrains

sumConcOverStrains
makeParamMatrixG

generic function which assigns values for Rtype or stoichiom to an array of the same name array has form [group,resource,path] reads in data from MFG dataframes
sumFlowOverStrains

sumFlowOverStrains
getStrainPHcorners

get stochastically generated pH corners for each strain
strainParams

strainParams dataframe
waterUptakeRatio

Computes the mass ratio of water uptake to substrate uptake (i.e. mass uptake of water divided by total mass uptake)
subsetFunc

this function is needed due to R dropping the names when it subsets
runMicroPopExample

runMicroPopExample
quickPlot

Generic plotting showing results of microPop
productionFuncDefault

Production Function
sumFlowsOverPaths

sumFlowsOverPaths
resourceSysInfoRumen

resourceSysInfoRumen dataframe
meanTraitFunc

calculate the mean trait at the end of the model run
getStrainParamsFromFile

get strain parameter values from a csv file
systemInfoMicrobesVirus

systemInfoMicrobesVirus dataframe
pHFuncDefault

pH Function
resourceSysInfo

resourceSysInfo
microPop-package

Microbial Population modelling
pHLimFuncDefault

pH Limitation Function
systemInfoResourcesPhyto

systemInfoResourcesPhyto dataframe
systemInfoMicrobesPhyto

systemInfoMicrobesPhyto dataframe
systemInfoResourcesVirus

systemInfoResourcesVirus dataframe
uptakeFuncDefault

Uptake Function
resourceSysInfoHuman

resourceSysInfoHuman dataframe