Page 1 of 1

Fitting a Lotka-Volterra model to a prey-predator stable dynamic using log files

Posted: Sun Feb 02, 2020 5:48 am
by lican
Given the nice populations and communities ecological phenomena that can be observed in cell lab simulations, I wanted to make a more quantitative approximation to the systems usually seen while playing. Particularly, I wanted to analyze a simple two antagonist-organism system. For that, I designed two simple swimmers: a prey and a predator. The predator has a first phagocytic egg state, and a second two-celled phagocytic swimmer larvae stage followed by a three-celled devorocyte swimmer. The prey has a much simpler development: one phagocytic egg and a two-celled phagocytic swimmer adult.
metamorphosis.jpg
When put together in the petri dish, prey and predator show a characteristic cyclic dynamic: when prey population explodes, predator follows it after a short time; that increases the predation rate so prey population starts to fall, which makes predators start to starve and die and so on, the cycles continues (see graphics below).
That behavior is described by a simple model of differential equations: the Lotka-Volterra model. It has two parameters for each specie population: one for intrinsic exponential growing or decreasing in absence of the other species, and one for the response to the interaction with the other species.
ecuaciones.jpeg
As I said, the prey population dynamic has two parameters: r (the proportional growing rate of prey in absence of predator) and d (the decreasing of that value due to hunting). Since the simulation has a discrete logging interval of 1 h, dX/dt can be assumed as ΔX/Δt . Thus, d and r are the slope and intercept of the following inear equation respectively:

ΔX/(Δt.X)= r-dY

ΔX=increment in prey number from one hour to next
Δt=1 h
X=prey number at the time considered
Y=predator number at the time considered

Similarly, the predator population parameters, m and b, can be calculated analyzing the intercept and slope of the following equation respectively:

ΔY/(Δt.Y)=-m+ bX

I tried to estimate the four parameters using the log file data of a series of 6 simulations. I assigned red color to the predator larvae and adult cells and green color to the prey adult cells so I could track their populations. The conditions of the simulations were: dish-diameter=3.0, nutrient rate= 15(max.), max_cell_count=6000, logging_interval=1 h.
cycle.ls.jpeg
(Cycles: red = predator, green = prey
Scatterplots: each color corresponds to a different simulation)

Finally, in order to check if the estimation of the parameters was appropriate, I computed the prey and predator number values at an hypothetical equilibrium as a gross indicator. This can be easily done by replacing the obtained parameters in the equations above and equalizing these to zero (i.e. looking what values X and Y do take in the virtual case in which prey and predator changing rate, dx/dt and dy/dt respectively, are zero). That gives an Xo and Yo equilibrium values corresponding to 1394 prey and 1779 predator individuals respectively. Those numbers coincide, at least by eye, with the values at which the populations oscillate around. That coherence could be checked more precisely with some statistic tests and confidence intervals. May be in a future.

Re: Fitting a Lotka-Volterra model to a prey-predator stable dynamic using log files

Posted: Mon Feb 03, 2020 1:10 am
by Petter
Wow, really beautiful work! Cool that the model works so well, the fit seems very convincing. Are the six different plots just repeats of the same experiment for statistics? I wonder how plate size affects this, for a very large plate I guess some far away regions will be rather independent of each other and the LV model doesn't apply any more. Also changing e.g salinity/viscocity should allow you to tune the LV parameters, it would be interesting to see how it affects the model.

Cheers,
Petter

Re: Fitting a Lotka-Volterra model to a prey-predator stable dynamic using log files

Posted: Mon Feb 03, 2020 1:24 am
by WhatTheSillyName
I don't have much to say.
But I just shared this article to most of the people that I know.
Well done :)

Re: Fitting a Lotka-Volterra model to a prey-predator stable dynamic using log files

Posted: Mon Feb 03, 2020 2:30 am
by lican
WhatTheSillyName wrote:
Mon Feb 03, 2020 1:24 am
I don't have much to say.
But I just shared this article to most of the people that I know.
Well done :)
Thanks!! :D
Probably there will be updates soon

Re: Fitting a Lotka-Volterra model to a prey-predator stable dynamic using log files

Posted: Mon Feb 03, 2020 2:52 am
by lican
Petter wrote:
Mon Feb 03, 2020 1:10 am
Wow, really beautiful work! Cool that the model works so well, the fit seems very convincing. Are the six different plots just repeats of the same experiment for statistics? I wonder how plate size affects this, for a very large plate I guess some far away regions will be rather independent of each other and the LV model doesn't apply any more. Also changing e.g salinity/viscocity should allow you to tune the LV parameters, it would be interesting to see how it affects the model.

Cheers,
Petter
I'm glad you liked it Petter!
Yes, I opted for making shorter repeats than one large simulation. Just in case the initial dynamic is determining the late behavior. But now, seeing there aren't big differences, I think it's better (and easier) to run analyze a single large dataset.
I tried with smaller plate diameters, and it just makes appear much more stochastic noise, which often leads the system to collapse. The large diameter, at least below 3.0, gives more homogeneous dynamic, I think similar would happen with extreme huge diameter, but it would be interesting to test. There are ecological theories that explore asynchronic systems, but they do it in the context of food patches, with "dessert" matrix. I tried to analyse systems like that with the nutrient clustering parameter, simulating patches, but it is not the same since the clusters appear randomly, therefore there aren't real patches. In those trials I used the salinity and viscosity parameters to adjust the number of stable populations, but didn't explore much more in that way.

Cheers
Lican

Re: Fitting a Lotka-Volterra model to a prey-predator stable dynamic using log files

Posted: Mon Feb 03, 2020 3:20 am
by lican
Next I want to make two adjustments to the model. First I would like to introduce logistic (sigmoidea) behavior to prey growing due to environmental limits. In that approximation I didn't considered it because prey numbers in oscillatory period were mostly inside the exponential interval of the sigmoid.
And second, I want to consider type 2 predator numeric response. It means the increasing in predator growing rate isn't just linear to prey number, but has an asymptotic increasing due to saturation. This point is important. Principally because I saw it. To be more accurate when extrapolating the regression back to intercept, for m estimation, I tried eliminating the food to make the prey's, and subsequent predator's, numbers to fall. That added more points to the left of the scatterplot, and they weren't aligned in a linear way, but started go down with a more pronunciated slope. Something similar occurred with higher prey's numbers: the points at right started to decrease the slope, in an asymptotic way. Since points density in those tails was much lower, I thought that cropping them and considering just the central linear interval (corresponding to the oscillatory period) wasn't a big problem. But it doesn't represent correctly the real behavior of predator population's response to prey numbers.