Home Forums Software Growth rate calculation?

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #1541
    sefrem
    Participant

    Hi there,

    I was wondering if you could explain how the growth rate value is calculated from OD with dithering?

    I did an experiment with b. subtilis where I held OD at various setpoints with dithering on. For some reason, the growth rate graph didn’t have a lot going on.

    See full graph here and zoomed in part here where the dithering seemed to work well.

    The growth rate value seems to rise as dithering continues despite the slope of the “zig” segments looking relatively constant.

    Thank you!

    #1542
    harrison
    Keymaster

    Hello,
    The growth rate data is “smoothed” compared to the raw derivative of the OD. This smoothing filter would therefore introduce a lag into the data i.e. it takes some time from an actual growth rate change until the estimated growth rate converges on the true value. This is done to make it as robust as possible in as many scenarios as possible (i.e it minimises the impact of noise), but as you observe, it takes a little bit of time to converge in your case. You could decrease the width of this filter which would mean your data would be noisier, but respond faster to changing growth rates. Probably the easiest way is for you to try some post-processing (i.e. process the OD data yourself in Excel/R/Matlab/Python) and decide on a filter width that looks good for your system, and then edit the Chi.Bio code to reflect this.

    #1543
    sefrem
    Participant

    Ah okay, so is the growth rate graph just the derivative of the OD graph with smoothing? And where can I find this filter value?

    #1544
    harrison
    Keymaster

    Yep, almost. It is in the ZigZag function of the code. In particular around line 2013 of the current version there is this code:
    if (iteration>6 and TimeSinceSwitch>5 and current > 0 and last > 0): #The reason we wait a few minutes after starting growth is that new media may still be introduced, it takes a while for the growth to get going.
    dGrowthRate=(math.log(current)-math.log(last))*60.0 #Converting to units of 1/hour
    sysData[M][‘GrowthRate’][‘current’]=sysData[M][‘GrowthRate’][‘current’]*0.95 + dGrowthRate*0.05 #We are essentially implementing an online growth rate estimator with learning rate 0.05

    return

    So you can see it does a difference in the (log) OD and then converts this to units of hours. It then has a moving average filter with ~0.05 learning rate. If you wish it to respond more quickly you could for example change the 0.95 to 0.8 and the 0.05 to 0.2 (make sure they add to 1). Hope this helps!

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.
Log in/Register
Scroll to top