Open hardware · Real-time tracking · Drosophila

Every fly.Every second.

Ethoscopes are small, open-source machines that film, track and interact with fruit flies in real time. Build them from a Raspberry Pi, a camera and 3D-printed parts, run dozens from one browser, and analyse the data in R or Python.

Raspberry PiCamera3D-printed case20-tube arena

01Hardware

Print every part.

An ethoscope is a Raspberry Pi with a camera, held in a 3D-printed case above an arena of glass tubes or a custom chamber. An infrared-sensitive camera keeps tracking through the night.

All files are in the repository, ready to print. The original paper also describes ethoscopes built from LEGO.

Render of a 3D printer nozzle printing the white ethoscope case.

02Real-time tracking

It doesn't just watch. It acts.

Each fly is tracked live on the Raspberry Pi, so the machine can respond to what an individual animal is doing: rotate its tube to keep it awake, deliver an odour, or switch on a light for optogenetics.

Modules run on one Arduino-based board with motors, valves and LEDs. Sleep deprivation, odour delivery and optogenetics are documented in the manual.

Two ethoscopes mounted on teal add-on modules; the module on the right lights red LEDs.

03The node

Dozens of machines. One browser.

A single computer, the node, finds every ethoscope on the network, starts and stops experiments and collects the data. Everything is controlled from a web browser.

In the original study one lab ran up to 70 ethoscopes, tracking 1,400 flies at the same time.

The node web interface listing ethoscopes, their status and the experiments they are running.
Node web interface · demo data

04Throughput

Built to scale.

Each machine is cheap and independent, so capacity grows one ethoscope at a time. Data from every machine land in one place, ready for analysis.

Rows of ethoscopes on shelves.

05Analysis

From tracking to figures.

Two open toolkits read ethoscope data directly: ethoscopy for Python and rethomics for R. Both score sleep from movement, handle metadata for hundreds of animals, and plot activity, sleep and circadian rhythms. ethoscope-lab bundles ethoscopy in a ready-made JupyterLab.

Pythonethoscopy

import ethoscopy as etho
from functools import partial

meta = etho.link_meta_index("metadata.csv", "results/")
data = etho.load_ethoscope(
    meta, FUN=partial(etho.sleep_annotation, rule="k")
)
df = etho.behavpy(data, meta, canvas="seaborn")
df = df.curate_dead_animals()
df.plot_overtime(variable="asleep", facet_col="genotype")

Rrethomics

library(scopr); library(sleepr); library(ggetho)

metadata <- link_ethoscope_metadata(metadata, result_dir = "results")
dt <- load_ethoscope(metadata, FUN = sleep_annotation)
ggetho(dt, aes(z = asleep)) + stat_tile_etho()
Fraction of flies asleep over three days, plotted with ethoscopy: control flies in grey, sleep-deprived flies in orange, with the deprivation night between 108 and 120 hours.
Sleep deprivation · ethoscopy

▶The film · 1:54

Two minutes on how ethoscopes work.

Music: “Flight of the Bumblebee” (N. Rimsky-Korsakov, arr. G. Poffenbarger), performed by the Concert Band of the United States Air Force Band of the Rockies. Public domain (U.S. government work), via Wikimedia Commons. Edited.

06Open source

Open, end to end.

Every part of the platform is public: the machines, the software that runs them and the tools that analyse their data. The software is released under GPL-3.0.

07Publications

Used in labs around the world.

The ethoscope paper has been cited by 133 publications, 116 of them from other groups, with authors in 35 countries.

Papers using ethoscopes →

If you use ethoscopes, please cite

Geissmann Q, Garcia Rodriguez L, Beckwith EJ, French AS, Jamasb AR, Gilestro GF (2017). Ethoscopes: an open platform for high-throughput ethomics. PLoS Biology 15(10): e2003026.
doi:10.1371/journal.pbio.2003026