Authors: Maxim Q. Capelle, Katja Slangewal, Panagiotis E. Eleftheriadis, and Armin Bahl
This code provides analysis and modeling tools for quantifying and simulating phototactic behavior in larval and juvenile zebrafish. The code extracts, compares, and fits behavioral algorithms from experimental data to reveal developmental switches in phototaxis.
If you use this code in your work, please cite our paper: Capelle et al., Behavioral algorithms of ontogenetic switching in larval and juvenile zebrafish phototaxis, iScience, 2026.
All data can be found under the persistent identifier: KonData Repository.
figures/— Scripts for generating figuressettings/— Configuration and settings filesutils/— Utility modules and helper functionsrequirements.txt— List of required Python packagesREADME.md— Project documentationprepare_data.py— Script for preparing and processing of raw datasimulate.py— Script for running simulations based on fitted models
- Install the required packages listed in
requirements.txt. - Configure the settings in
settings/general_settingsas needed for your analysis (especially regarding the paths) - Run the scripts in the
figures/directory to generate the desired figures. Alternatively, all figures can be generated at once by runningfigures/run_all_figures.py. The following dependencies between scripts should be noted:fig3.pyrequiresfig3_fit_models.py.fig4B.pyrequiresfig1_and_4_all_agents.py.figS5.pyrequiresfig1_and_4_all_agents.py.figS6.pyrequiresfig2.pyandfig3_fit_models.py.figS7.pyrequiresfig1_and_4_all_agents.py.
Each script is named after its corresponding figure in the paper for easy reference.
