Skip to main content
. 2017 Mar 28;6:e25051. doi: 10.7554/eLife.25051

File name

Function

FitCost_BasalFitness

Source code 1

Calculates the cost function for monocultures (i.e. the difference between the target mechanistic

model dynamics and the dynamics obtained from the pairwise model)

FitCost_BFSatLV.m

Source code 2

Calculates the cost function for communities (i.e. the difference between the target mechanistic

model dynamics and the dynamics obtained from the saturable L-V pairwise model)

FitCost_BFSatLV_Dp.m

Source code 3

Calculates the cost function for communities (i.e. the difference between the target mechanistic model

dynamics and the dynamics obtained from the alternative pairwise model)

DynamicsMM_WM_MonocultureDpMM.m

Source code 4

Returns growth dynamics for monocultures, based on the mechanistic model

DynamicsMMSS_WM_NetworkDpMM.m

Source code 5

Returns growth dynamics for communities of multiple species, based on the mechanistic model

DynamicsWM_NetworkBFSatLV.m

Source code 6

Returns growth dynamics for communities of multiple species, based on the saturable L-V pairwise

model

DynamicsWM_NetworkBFSatLV_Dp.m

Source code 7

Returns growth dynamics for communities of multiple species, based on the alternative pairwise model

DeriveBasalFitnessMM_WM_DpMM.m

Source code 8

Estimates monoculture parameters of pairwise model (Step 1)

DeriveBFSatLVMMSS_WM_DpMM.m

Source code 9

Estimates saturable L-V pairwise model interaction parameters (Step 2)

DeriveBFSatLVMMSS_WM_DpMM_Dp.m

Source code 10

Estimates alternative pairwise model interaction parameters (Step 2)

DeriveBFSatLVMMSS_WM_DpMM_r21.m

Source code 11

Estimates saturable L-V pairwise model interaction parameters (r21 and K21) in cases where we know

that S2 is only affected by S1, to accelerate optimization

DeriveBFSatLVMM_WM_DpMM_Dp_r21.m

Source code 12

Estimates alternative pairwise model interaction parameter (r21) in cases where we know that S2

is only affected by S1 and that KS2C1=KC1S2 to accelerate optimization

DynamicsWM_NetworkBFLogLV_DI.m

Source code 13

Returns growth dynamics for communities of two species competing for an environmental resource

while engaging in an additional interaction, based on the logistic L-V pairwise model (Figure 6)

C2Sp2_ARCLi_NoSatDp_FitBFLogLV_DI.m

Source code 14

Estimates logistic L-V pairwise model interaction parameters for communities of two species

competing for an environmental resource while engaging in an additional interaction, and

compares community dynamics from pairwise and mechanistic models (Figure 6)

Dynamics_WM_NetworkDpMM_ODE23.m

Source code 15

Defines differential equations when using Matlab’s ODE23 solver to calculate community dynamics

Case_C1Sp2_CmnsDp_ODE23.m

Source code 16

Example of using Matlab ODE23 solver for calculating community dynamics