Individual Maggot Behaviour Analysis

The Individual Maggot Behaviour Analysis (IMBA)

We are happy to announce our new software to analyse the individual behaviour of Drosophila larvae within groups. It has been designed to work with established behavioural paradigms, without the need of any specific hardware besides a camera.

The the publication, see https://doi.org/10.1098/rsob.220308. The code, together with a brief installation manual, is freely available here.

If you want to use it, please cite: Thane M, Paisios E, Stöter T, Krüger A-R, Gläss, Dahse A-K, Scholz N, Gerber B, Lehmann DJ, Schleyer M. 2023. High-resolution analysis of individual Drosophila melanogaster larvae uncovers individual variability in locomotion and its neurogenetic modulation. Open Biol 13: 220308 . DOI: https://doi.org/10.1098/rsob.220308 


We are always happy to use our software for new scientific questions. If you think your project could profit from a detailed behavioural analysis, please contact us! We can help you to get the software running on your device, or we can analyse the videos that you send us.

The IMBAtracker

Using C++, the IMBAtracker can detect and track individual larvae within groups. Both bright objects on black background and dark objects on white background are supported. Many different kinds and qualities of videos can be used as long as the contrast between background and larvae is sufficient. Below, you see some examples of successfully tracked videos. High-quality versions of these videos are available as supplement of the article.

As Drosophila larvae look very similar to each other with no visible individual traits, the identity of animals is usually lost when they touch each other (collide). In the IMBAtracker, two rounds of collision resolution, using a computational contour-based model and a statistical approach, keep the identity of larvae across most collisions. This allows us to analyse the behaviour of individual animals tested within groups.


Video from Thane et al. 2023. A group of innate wildtype larvae in an odour gradient. White circular objects are odour containers

Video from Thane et al. 2023. A group of larvae of the CirlRescue genotype.

ViVideo from Thane et al. 2023. Original video was recorded with the FIMtrack setup, from Risse et al. 2017, IEEE Trans Biomed Eng

Video from Thane et al. 2023. Original video was recorded for the wrMTrck software, from Brooks et al. 2016, J Insect Physiol 

The IMBAvisualiser

Implemented as an R shiny app, the IMBAvisualiser provides an interactive, versatile tool for analysing and visualising the behaviour of individual animals. Starting from the coordinates of 12 spine points and a couple of vectors, it currently calculates more than 90 attributes of each animal, including various measures of speed, angles and directional changes.

Furthermore, the software provides a wide range of plots to visualise the results, as well as basic statistical tests and a random forest machine learning approach for an unbiased data analysis. All results can be downloaded in commonly used data formats. Below, you find some examples of findings that we made using the IMBAvisualiser (from Thane et al. 2023).


Inter- and intra-individual variability 

We found that attributes of peristaltic forward locomotion (IS speed, IS distance and IS interval) were little variable within and across individuals, whereas attributes of bending and head movements (HC angle) were very variable. So, forward locomotion seems to be a stable trait of an individual, whereas bending and head movements are changing dependent on environmental cues and internal goals.

The CirlKO mutant performs 'stumble' steps

We analysed behavioural phenotypes of a mutant in an adhesion G protein-coupled receptor gene (Cirl). We found that the mutants performed a different pattern of peristaltic locomotion, and compared these 'stumble' steps with normal stepping patterns in detail. Further research will show the mechanisms underlying this novel phenotype.

Repeated activation of dopamine neurons

Dopamine plays a crucial role in movement control across the animal kingdom. We found that artificial activation of dopamine neurons causes the larvae to stop and bend. Interestingly, repeated activation of the same neurons causes similar changes in an idiosyncratic manner - that is, the behaviour of individuals were correlated across repeated neuronal stimulations. Currently, we try to find out which specific dopaminergic neurons cause which behavioural change.

Switch between moving forward & backward

By activating backward-locomotion inducing interneurons in the brain ('moonwalker neurons'), we studied the switches between forward and backward crawling in larvae. Critically, we found that each animal reverted to forward crawling after the neuronal stimulation has ended at a different, individual time. When the switch happened, it was characterised by strong bending and curling of the animals.