Skip to main content
Dryad logo

Improving estimations of life history parameters of small animals in mesocosm experiments: A case study on mosquitoes

Citation

Dellar, Martha; Boerlijst, Sam; Holmes, David (2022), Improving estimations of life history parameters of small animals in mesocosm experiments: A case study on mosquitoes, Dryad, Dataset, https://doi.org/10.5061/dryad.18931zcxw

Abstract

We used an experimental setup with 48 aquatic mesocosms, each with twenty first instar mosquito (Culex pipiens) larvae and under one of twelve treatments with varying temperatures and nutrient concentrations. We took daily subsamples of the aquatic life stages as well as counting the emerging adults. We developed a method to estimate the survival and development probabilities at each life stage, based on optimising a matrix population model. We used two different approaches, one calculating the difference between predictions and observations based on a normal distribution, and the other using a combination of a normal and a multinomial distribution. For each approach, the resulting optimisation problem had around 100 parameters, making conventional gradient descent ineffective with our limited number of data points. We solved this by computing the formal derivatives of our matrix model.

Methods

For full details see our paper: "Improving estimations of life history parameters of small animals in mesocosm experiments: A case study on mosquitoes".

https://doi.org/10.1111/2041-210X.13814 

Usage Notes

These files accompany the paper "Improving estimations of life history parameters of small animals in mesocosm experiments: A case study on mosquitoes".

The code provided enables replication of our results.

If you wish to apply this methodology to your own research project then this code should provide a good starting point.

To run our model and the optimisation, use one of the following:
- normal_model_plus_optimisation.py
- mixed_model_plus_optimisation.py
The normal version should run on a regular laptop. The mixed version will require a supercomputer or computing cluster.
The mixed version requires Python3.7 or later.

The mixed version uses initial conditions defined in a separate text tile (initial_contidions_for_mixed.txt). 
We originally used very basic initial conditions(x0 = [0.5 for i in range(0,96)]+[1,1,1,2]), but found that this gave a non-optimal result for treatment 1.
To fix this we ran the optimisation again, with initial conditions for treatments 2-12 as the optimised values we had just calculated, and the initial 
conditions for treatment 1 as the optimised values from the all-normal approach.

The optimised probabilities for each approach are stored in:
- normal_probabilities.txt
- mixed_probabilities.txt

To run the validation (based on experimental data) use:
- validation.py

For the simulation analysis:
To generate input files:
- simulation_analysis_create_inputs.py
To run the simulation anaysis, you can use the normal_model_plus_optimisation.py and mixed_model_plus_optimisation.py files, just change the name of the observations ('main_data.csv') file (be warned, this takes a LOT of computing resources when running for the mixed-distribution approach).
All inputs and outputs for the simulation analysis are available in simulation_analysis_inputs_and_outputs.zip
To analyse the results use:
- simulation_analysis_analyse_results.py

To make graphs of adult emergence, proportions of larvae and pupae, and survival and development probabilities use:
- make_plots.py

Data for the main and validation experiments is stored in:
- main_data.csv
- validation_data.csv

To save the predicted populations and optimised probabilities to a csv file use:
- write_outputs_normal.py
- write_outputs_mixed.py

Funding

Nederlandse Organisatie voor Wetenschappelijk Onderzoek, Award: NWA.1160.1S.210

Nederlandse Organisatie voor Wetenschappelijk Onderzoek, Award: 613.009.103