Light-off Startle Response, (Adult Drosophila)

Below provides the scripts, assets and R code for data analysis for a publication by Allen et al. (2020) investigating prepulse inhibition to a light off stimuli in adult Drosophila.

There are three zanscripts for the light-off startle response protocol for Drosophila.

You will also need to create an asset for a 24-well plate to include in all three of the zanscripts. More information on how to generate assets can be found here.



  1. Light Off Duration this zanscript will expose Drosophila to a light off stimuli of varying duration including 11, 13, 15, 17, and 19ms
  2. Habituation this zanscript will expose Drosophila to repeated light off stimuli at 1 second intervals
  3. Ppi this zanscript will expose Drosophila to a pre-pulse light off stimuli before a full light off stimuli

Data and Analysis

The data presented here is that produced by Allen et al. (2020) for publication. It has been uploaded as an example of the data output which can be produced from this protocol

Light off duration:

Light Off Duration Data 1

Light Off Duration Data 2

Light Off Duration Log Data


Habituation Data


Ppi Data 1

Ppi Data 2

Ppi Data 3

Ppi Data 4

Ppi Data 5

The R code presented here was the code used by Allen et al. (2020) for analysis of the above data. It has been uploaded as an open resource for analysing data produced from the PPI protocol with Drosophila.

Light Off Duration Analysis

Habituation Analysis

Ppi Analysis

Note: this data analysis was performed on a Windows device using Rstudio version 1.3.1056, R version 4.0.2, tidyverse 1.3.0. As such some edits to the coding may be necessary if you are trying to use this code on a different device and/or a different version of R software. Mac users may be required to load additional packages to the standard "tidyverse" package in order for some functions in the code to work.