TITLE: Bioflux Analyses: Modelling
AUTHORS: Tobias Weise, Bettina Boettcher, Slavena Vylkova

[DESCRIPTION]
<div class = "text-blocks"><div class = "text-block">Biofilm formation under shear flow conditions was monitored using the Bioflux1000 device (Fluxion Biosciences, Inc.). In short, Candida albicans overnight cultures were washed in pre-warmed RPMI medium. Cells were seeded for 2-5 sec from the outlet well into the channels of Bioflux1000 flow chambers, which were primed before with warm medium. The cells were allowed to adhere to the channels for 90 min without any flow, followed by removal of non-adherent cells by flowing fresh, pre-warmed RPMI medium for 5 sec. Shear flow was set for time series experiments over 24 h biofilm formation and images were captured every 20 min. Two channels were investigated in parallel having a 10 × magnification to allow a direct comparison between a mutant and a reference (wild-type) strain. Image capturing and stacks to movies was performed using the MetaMorph® Software (Molecular Devices).</div><div class = "text-block"><span>An ODE model reflecting the logistic growth as well as the lag phase was fitted to the individual experiments. Fitting was carried out by minimising a cost function (unweighted least-squares-based) using the </span><span style = "font-style:italic;">Nelder-Mead </span><span>algorithm. Growth rate time series generated from the fitted model were used to compare wild type and mutant regarding the maximum observed growth rates at their respective time points.</span></div><div class = "text-block">All computations were performed using the programming language python (version 3.6.9) and the additional packages numpy (version 1.16.2), pandas (version 0.25.0), and scipy (version 1.3.1).</div></div>

[STEPS]
?. [Modelling Approach]
The modelling presented here uses a simple ODE model fitted to the individual Bioflux Ipix time series data sets (Fig. 1-A) in order to estimate the height as well as the time point of maximum observable growth (Fig. 2-B). Table 1 contains symbols and abbreviations used within the modelling approach and parameter estimation.
?. [Modelling Approach]
Ordinary differential equation for discontinuous bioprocessesThe modelling presented here was carried out using the ordinary differential equation for discontinuous bioprocesses with respect to the mean pixel intensity calculated according to the protocol 'Bioflux Analyses: Image Preprocessing'.\frac{d I_{\rm{pix}}}{d t} = \mu_{\rm{max}} \cdot \lambda(t) \cdot \chi(I_{\rm{pix}}) \cdot I_{\rm{pix}}Growth KineticsThe growth of the culture was described using the following kinetics:logistic equation (Verhulst-eqation;  employed to modell the capacitive limit of the biomass accumulation)  lag phase (Wolf-equation;  employed to modell the initial lag phase of the culture due to adaptation)\chi(I_{\rm{pix}}) = 1 - \frac{I_{\rm{pix}}}{I_{\rm{pix,max}}}\lambda(t) = 1 - \exp\left(-\frac{t + t_d}{t_i + t_d}\right)The model parameters µmax, Ipix,max, ti as well as the start condition Ipix,0 is estimated within Step No. 2. The adherence time td represents the time difference between the seeding of the cells an the start of the experiment/simulation. td was set to 1.5 h for all simulations in accordance to the experimental set-up.
?. [Modelling Approach]
Import of the required packages.import numpy as npimport pandas as pdimport scipy.integratefrom scipy.optimize import fmin
?. [Modelling Approach]
Definition of the growth kinetics.# logistic equation (Verhulst)def chi(Ipixmax,Ipix):    return 1 - Ipix / Ipixmax# description of lag phase (Wolf-term)def wolf(ti,td,t):    return 1 - np.exp( - ( t + td ) / ( ti + td ) )# growth kineticsdef mu(mumax,Ipixmax,ti,td,Ipix,t):    return mumax * chi(Ipixmax,Ipix) * wolf(ti,td,t)
?. [Modelling Approach]
Definition of the ODE model.# Model#===========================================================================def eq(indep_par,exp_par,start_t,end_t,incr):    initial_cond = indep_par[0],0    mumax,Ipixmax,ti = indep_par[1:6]    td = exp_par    t  = np.linspace(start_t, end_t,incr)   # time grid#   ------------------------------------------------------------------------    def funct(y,t):                         # ODE system        Ipix = y[0]                         # biomass         tin = y[1]                          # internal t (needed for Wolf-term)        dIpixdt = mu(mumax,Ipixmax,ti,td,Ipix,tin) * Ipix        dtindt = 1        return [dIpixdt,dtindt]#   ------------------------------------------------------------------------    ds = scipy.integrate.odeint(funct,initial_cond,t) #integrate    return (ds[:,0],t)
?. [Parameter Estimation]
Based on the ordinary differential equation above, the experimental Ipix time series data sets were simulated individually for the respective experiment. The time series were simulated for an experiment time of 24 h. Numerical integration was carried out employing lsoda from ODEPACK (scipy.integrate.odeint).The objective of the parameter estimation was to identify the parameter values for the respective experiment. The model parameters µmax, Ipix,max, ti as well as the start condition Ipix,0 are vectorised as θ. The optimum parameter values Ω were estimated by minimising the cost function J(θ) using the downhill-simplex method (Nelder-Mead method; scipy.optimize.fmin). Standard settings regarding the convergence criteria were used with respect to the above package.J(\theta) = \sum_{i=1}^{n} \left(I_{\rm{pix,data}} - I_{\rm{pix,model}}\right)^2J(\Omega) =\underset{\theta}{\text{min}}\,J(\theta)
?. [Parameter Estimation]
Definition of the scoring function (least-squares).# definition of scoring function (least-squares beased)def score(parms):    # score difference between model and data points    ss = lambda data,model:(( data - model )**2 ).sum()    # get solution to system    Ipix_model,t_model = eq(parms,exp_rates,0,time,100)    # model index to compare to data    mt=np.linspace(0,time,100)    findindex=lambda x:np.where(mt>=x)[0][0]    Ipix_index=list(map(findindex,data.time))    data.Ipix_model = Ipix_model[Ipix_index]    return ss(data.Ipix,data.Ipix_model)
?. [Parameter Estimation]
Execution of the parameter estimation.initials = [Ipix_zero,mumax,ti,Ipix_max]exp_rates = 1.5 # [h]time = 24 # [h]answ = scipy.optimize.fmin(score, rates, full_output=1, retall=1, maxiter=1000)estimates = answ[0]score_value = answ[1]
?. [Parameter Estimation]
Based on the parametrised model Ipix and growth rate time series were simulated for each experiment (Fig. 2-A and B). The subsequent evaluations were carried out using the modelled time series.According to Fig. 2-B, the height as well as the time point of the maximum observable growth rate is recorded. These values are used for the comparison between the wild type an their respective mutant.
?. [Case Study]
In order to illustrate the differences in the biofilm formation between wild type and mutant strains, the observed maximum growth rates are plotted against their respective time points (Fig. 3.1)-A. The differential plot (Fi. 3.1-B), conferring to subfigure A, presents these differences between the mutant strains (arrow head) and their respective wild types (arrow tail).