Posts in Category: papers

Coccinella

An AI generated podcast explaining the paper in a fun and engaging way (created with Google’s NotebookLM)

What is coccinella?

Coccinella is an innovative open-source framework developed for high-throughput behavioral analysis. Leveraging the power of distributed microcomputers, it facilitates real-time tracking of small animals, such as Drosophila melanogaster. Complementing this tracking capability, coccinella employs advanced statistical learning techniques to decipher and categorize observed behaviors. Unlike many high-resolution systems that often require significant resources and may compromise on throughput, coccinella strikes a balance, offering both precision and efficiency. Built upon the foundation of ethoscopes, this platform extracts minimalist yet crucial information from behavioral paradigms. Notably, in comparative studies, coccinella has demonstrated superior performance in recognizing pharmacobehavioral patterns, achieving this at a fraction of the cost of other state-of-the-art systems. This framework promises to complement current ethomics tools by providing a cost-effective, efficient, and precise tool for behavioral research. Coccinella analysis can be done in ethoscopy, a Python framework for analysis of ethoscope data.

How does it work?

Coccinella uses ethoscopes to extract information about the activity of flies in real time. Ethoscopes are machines that use distributed computing via Raspberry PI to detect and interfere with behaviour. Given the off-the-shelf nature of the devices, the all setup is inexpensive and scales up very easily. As term of reference: our lab currently employs about 100 ethoscopes, with a processing power of 20 flies each.

Data about the activity of the animal are then fed to a high-throughput toolbox for time series analysis called HCTSA or Catch22, initially developed at Imperial College London by our colleagues in the Maths Department. The toolbox performs numerous statistical tests aimed at segregating data in an unsupervised way and can therefore be used to cluster together data that the machine recognises as similar. In our case, we tried to identify which drugs have similar mode of action, potentially recognising and assigning the appropriate pharmacological pathways to new, uncharacterized compounds.

We also compared the performance of coccinella to state of the art systems and found that it performs even better!

This is important from the technical point of view but also from the standpoint of neuroscience because it shows that “less is more” when it comes to extracting and recognising behavioural data. In other words, you don’t need to carefully label posture and movement when characterising behaviour: reducing activity to its minimal terms actually works even better!

Coccinella paper on eLife
Ethoscopy / Ethoscope-lab paper on Bioinformatics Advances
Ethoscopy on GitHub
Ethoscopy on PyPi
Ethoscope-lab Docker container on DockerHub
Jupyter Notebook tutorials for Ethoscopy on GitHub
Ethoscopy and Ethoscope-lab documentation on bookstack
Raw data and all notebooks reproducing the paper’s figures on Zenodo

Divergent evolution of sleep in Drosophila species

Joyce, M., Falconio, F.A., Blackhurst, L. et al. Divergent evolution of sleep in Drosophila species. Nat Commun 15, 5091 (2024). https://doi.org/10.1038/s41467-024-49501-9
An AI generated podcast explaining the paper in a fun and engaging way (created with Google’s NotebookLM)

Elephants spend up to 18 hours a day eating grass, bushes, roots, shrubs to maintain their appropriate calorie intake. They sleep only 1 or 2 hours a day. Bats, on the other hand, are believed to sleep more than 20 hours a day. Finally, Great Frigatebird. They would normally sleep 9-10 hours a day and you would have hard time trying to get them to sleep less than that. Unless it’s migratory season. In that case, they sleep 40 minutes a day, while they flies for days and days in a row. Evolution is one of the great mysteries of sleep. Why do some animals require 20 hours, while others can cope with 1 or 2? Whatever sleep function is, how can it be accomplished in 10 hours in one season and 40 minutes in another, as it happens in migratory birds?

We won’t really understand what sleep is and what it does if we keep thinking about it in an anthropocentric way. We need to look at it from the evolutionary standpoint and only then we will be able to grasp what its role in nature is. This work marks our first big attempt in this direction. We did not compare sleep between elephants and bats. Too tricky to keep in the test tube and too evolutionary distant. Instead, we used seven species of Drosophila spanning an evolutionary distance of 5-50 Million years and with different ancestral origins and adaptation niches.

In all of them, we measure sleep using a computerised video tracking system based on Raspberry PIs which can be linked to robots to deliver sensory stimuli in real-time, such as puffs of air or automatic rotations of the test tube to keep them awake. We had actually used this device before to explore how fruitflies recognise and respond to salient stimuli during sleep. Here, we combined those with the excellent hidden Markov chain model initially proposed by the Griffith Lab at Brandeis and were able to confirm that different sleep stages as detected by the Markov chain do indeed coincide with different arousabilities. Deep sleeping flies are harder to wake up!

We found that all species sleep in more or less the same way, although for very different lengths of time. In almost all species, sleep is sexually dimorphic: females sleep only at night and males sleep in the afternoon too. Except for D. virilis: a cosmopolitan species believed to have arisen in the Miocene in the deserts of Afghanistan. Interestingly, this is something very recently found in other desert species too. You probably don’t want to be flying around in a desertic afternoon! So, sleep amount is generally conserved and obviously it adapts to species-specific ecological conditions, exactly as for the elephant and the bat. But what about sleep homeostasis? How do these exotic flies react when we try to keep them awake? For this, we turned to our trusty robots and kept flies awake for 24 hours in a row by rotating their little world around every time the fell asleep. A bit like in the Inception movie. Watch the first tube from the left to see the robot in action.

When you deprive an animal of sleep, it tries to recover some of it ASAP. This is a hallmark of sleep homeostasis and what we observed in D. melanogaster, but not in any of the other species! Like the migratory birds, they suddenly seemed OK not sleeping. No signs of tiredness. And even making our robot work for 7 days in a row – 168 hours – did nothing to them! These other species could stay awake just fine and showed no signs of tiredness. Except for melanogaster, which showed a steady increase in sleep pressure. However, at least some species were able to show rebound sleep when we used a different way of keeping them awake: social stress induced by male-male interaction in a laboratory boxing-ring equivalent. Stress can induce rebound sleep in many species, including rodents, and it does so by activating specific brain circuits as our colleagues recently showed.

Surprisingly, male-male interaction did lead to sleep rebound not just in melanogaster but also, simulans, sechelia, yakuba. Still no signs of homeostasis in the remaining three species though! What decides whether an animal will show homestasis? It seems the answer is in their brains. We found that, in general, sleep rebound correlated with an increase in synaptic strength. All the flies that showed rebound also showed a larger amount of a specific synaptic protein. And conversely, when we remove synaptic proteins from specific parts of the brain involved in learning and memory in D. melanogaster we get a similar effect: no tiredness after sleep deprivation.

We also go on and look at the evolution of pharmacology in these species and much more. Have a go at the manuscript yourself. It’s hopefully easy to read for everyone. hat is the take-home message? Well, we try to figure out what all this means in evolutionary terms. We think sleep has different functions in different species (doh!) and some functions therefore evolved for some species but not others. The one common thing all animals have in common is they all sit on the same planet which has been rotating at the same speed for a very long time. We believe this adaptation created sleep in the first place giving animals a chance to optimise their activities to days & nights. Then, other sleep functions kicked in. Some animals need sleep to cope with stress; some others need sleep to learn better; to memorize; to fight bacteria. Who knows how many different functions there are? Some need sleep for multiple reasons at once. This makes sense on multiple levels and can ultimately explain why elephants can do in 1 hour what bats seem to take 20 hours for!

Ethoscope db files for all the behavioural data in the work (FTP)
Jupyter notebooks and metadata for all the figures in the paper (link)
BRP quantification in Fig. 2 – Images and quantification scripts (link)
Paper on Nature Communications (link)(pdf)
Twittorial describing the findings (link)

Ethoscopy and Ethoscope-lab

  • Ethoscopy is Python software for analysis of ethoscope data – and more! – created by Laurence Blackhurst
  • Ethoscope-lab is a pre-baked Docker container featuring an installation of the multi user Jupyter Hub with Python and R kernels, ready to be used with Ethoscopy and Rethomics.

Why using ethoscope-lab?

Let me simply explain how we use it in our lab. We arranged a powerful workstation that acts as lab server and run a dockerized ethoscope-lab on it. The workstation has a local copy of all our ethoscope data (about 8 Terabyte as I type) and ethoscope-lab has local access on those, offering the quickest loading time. Users can then use their computer, or tablet to connect to the workstation and perform data analysis directly from the browser. The setup frees them from working at their desk and allows access to their data from anywhere in the world, guaranteeing at the same time the fastest computational performance even when they work on their laptops. Moreover, the system uses Jupyter notebook as default, meaning each analysis can be nicely annotated and exported to be shared with the world post-publication, along the original raw data.

To give a practical example: this series of repositories on zenodo contains the entire dataset of our latest paper (316Gb) and it’s paired to all the notebooks we used to generate each figure. Readers can download the dataset freely, install ethoscope-lab as docker container on any computer (irrespective of the operating system they adopt) and reproduce all our analyses!

Ethoscopy / Ethoscope-lab paper on Bionformatics Advances
Ethoscopy on GitHub
Ethoscopy on PyPi
Ethoscope-lab Docker container on DockerHub
Jupyter Notebook tutorials for Ethoscopy on GitHub
Ethoscopy and Ethoscope-lab documentation on bookstack

Sensory processing during sleep in Drosophila Melanogaster

An AI generated podcast explaining the paper in a fun and engaging way (created with Google’s NotebookLM)

One of the most puzzling aspects of sleep is that it cannot happen without depriving us of our full conscious experience. Whatever the function of sleep is, it cannot be achieved without disconnecting our brains from the external world. A full conscious state and sleep are not compatible, it seems, to the point that one of the definitions of consciousness is that “it is all that fades away when we are in dreamless sleep”.

The fact that the brain has to surrender to the tyranny of sleep is also the main reason why scientists believe (in a rather dogmatic fashion) that sleep is “of the brain, by the brain for the brain“. Yet, even during sleep parts of our brains retain some ability to process external information. In the 1960s, Oswald et al formally showed that sleeping humans could wake up in response to some salient stimuli, such as their names being called, but not in response to stimuli of identical strength but no salience, such as other people’s names or their names played in reverse.

This finding has been confirmed and extended over the decades in the scientific literature, providing evidence that it applies to even more complex nuances of saliency, such as an angry tone of voice. The videos below suggest that scientific literature is certainly less comprehensive and (less amusing) than the phenomenon in its entirety.

Pets wake up to food odours and food-related noises.
And the human brain is certainly able of very deep sensory processing!

Even though we have numerous scientific and anecdotal evidence that animals and humans can wake up to salient sensory stimuli during sleep, hardly anything is known about the biological underpinning of this phenomenon. And here: enter Drosophila melanogaster! What better animal model than flies to dissect this amazing brain property?

In a paper titled “Sensory processing during sleep in Drosophila melanogaster” published in Nature, we introduce flies as the ideal animal model to dive into the biology of how a brain can simultaneously be asleep and respond to external stimuli.

Postdoc Alice French took the lead on this amazing project to show that even flies can recognise salient stimuli in their sleep and react accordingly, modulating their response based on their internal state. We initially expanded the robotic platform we had previously built in the lab, called ethoscopes, which allows us to monitor and interfere with flies using inexpensive @Raspberry_Pi computers. Alice wanted to build a robotic component able to challenge single flies with specific odour but only while they were asleep, to record whether they would wake up or not. She obviously started with…. LEGO!

In our first prototype, we built a robot able to operate a LEGO valve so to send a puff of air to the sleeping fly. LEGO valves were a good start because we needed 500 of them.

The system worked and we went from those early all-LEGO prototypes (left) to the final 3D printed product (right).

Using this ethoscope module we could challenge sleeping flies with different odours and check whether they would respond differently to some of them. We found they did! Flies would respond to 5% acetic acid for instance, but not to 10% acetic acid. Not only that, the valence of the odour could be modulated by internal states. Flies that had received a little starvation were increasing their response specifically to food-related odours. When we gave alcohol to flies, on the other hand, we found drunk Drosophilae were less responsive to odours in general showing somehow a deeper sleep state.

Now, flies are arguably the best animal model to study circuit neuroscience these days. We have a full connectome of the fly brain and countless genetic tools that allow us to turn neurons on and off. So that is what we did. We started turning neurons on and off in the fly brain, looking for some that would modulate their ability to sense stimuli during sleep. We found them!

Image

We actually found the whole circuit, connecting the “fly nose” all the way to the sleep centers in the brain. And when we used thermogenetics to switch those neurons on or off with infrared radiation, we could interfere with that process and make the flies more or less responsive.

In short, we have shown that flies can recognise and respond to odours during sleep, waking up only to those that they consider salient. We also show that this phenomenon is plastic and modulated by internal states, with animals being more likely to wake to food odours after a little starvation. We also described a blueprint for a neuronal circuit that connects the peripheral olfactory receptor neurons all the way to known sleep-regulating centres in the fly brain. We explore three prototypical gate-points that modulate subconscious processing of olfactory information during sleep: two at the periphery and one in the central brain.

The story is important and of general interest for at least three reasons:

  1. for the groundbreaking implications it has on the consciousness field, introducing flies as a model to study
    subconscious processing of information, and providing an experimental paradigm that allows to empirically face some key questions of the field;
  2. for the implications it has on the sleep community, describing the neuronal circuit regulating sensory processing during sleep, a neuronal feature that is poorly understood in any other animal model. Our description of the circuit regulating sensory processing during sleep is the most accurate to date and the work also potential future medical significance, for instance in the study of altered states of consciousness, such as coma;
  3. for the implications it has on the larger neuroscience community, describing how a circuit modulates the processing of sensory information to distinguish valence.

Drosophila has been employed to study arousal threshold many times before. There are many studies in which flies can be used to gauge sleep “depth” by using quantitative mechanical stimuli, such as simple vibration or touch. Our study is the first one to study a more puzzling property: how do we recognise qualitative stimuli during sleep? How do we recognise our own name while unconscious?

The video abstract below provides more information on the contents and the implications of the work.

The full reference to the paper is:

The work was supported by BBSRC and H2020-Marie Curie funding. The lead author of the study is Dr. Alice French.

Nature has featured the paper with a dedicated News & Views by Wahne Li and Alex Keene.

Imperial wrote a little PR piece.

Video tracking and analysis of sleep in Drosophila melanogaster

Nat Protoc. 2012 Apr 26;7(5):995-1007.
Video tracking and analysis of sleep in Drosophila melanogaster.
Giorgio F. Gilestro

In the past decade, Drosophila has emerged as an ideal model organism for studying the genetic components of sleep as well as its regulation and functions. In fruit flies, sleep can be conveniently estimated by measuring the locomotor activity of the flies using techniques and instruments adapted from the field of circadian behavior. However, proper analysis of sleep requires degrees of spatial and temporal resolution higher than is needed by circadian scientists, as well as different algorithms and software for data analysis. Here I describe how to perform sleep experiments in flies using techniques and software (pySolo and pySolo-Video) previously developed in my laboratory. I focus on computer-assisted video tracking to monitor fly activity. I explain how to plan a sleep analysis experiment that covers the basic aspects of sleep, how to prepare the necessary equipment and how to analyze the data. By using this protocol, a typical sleep analysis experiment can be completed in 5-7 d.

Go to pubmedDownload paper as PDF

Ethoscopes: An Open Platform For High-Throughput Ethomics

PLOS Biology, 19 Oct 2017; 15(10): e2003026
Ethoscopes: An Open Platform For High-Throughput Ethomics
Quentin Geissmann, Luis Garcia Rodriguez, Esteban J. Beckwith, Alice S. French, Arian R Jamasb, and Giorgio F Gilestro

We present ethoscopes, machines for high-throughput analysis of behaviour in Drosophila and other animals. Ethoscopes provide a software and hardware solution that is reproducible and easily scalable. They perform, in real-time, tracking and profiling of behaviour using a supervised machine learning algorithm; can deliver behaviourally-triggered stimuli to flies in a feedback-loop mode; are highly customisable and open source. Ethoscopes can be built easily using 3D printing technology and rely on Raspberry Pi microcomputers and Arduino boards to provide affordable and flexible hardware. All software and construction specifications are available at http://lab.gilest.ro/ethoscope.

Online paper on PLoS Biology

Supplementary material.

Supplementary material 1 – webGL model of the ethoscope.
Supplementary material 2 – instruction booklet for the LEGOscope.
Supplementary material 3 – instruction booklet for the PAPERscope.
Supplementary Video 1 – Introduction to the ethoscope platform.
Supplementary Video 2 – The optogenetics component of the optomotor in action.

Featured in:

Regulation of sleep homeostasis by sexual arousal

Why we sleep remains an unresolved mystery of biology. Why do humans have to spend one-third of their lifetime in a status of profound unconsciousness which leaves them vulnerable and endangered? What do we gain from it? We still do not possess an answer to this question but we assume that it must be something tremendously important, also considered that sleep appears to be a necessity not just in humans but in all animals – including fruit flies. A particularly intriguing evolutionary conserved feature of sleep is what we call “sleep homeostasis”, that is: the innate modulation of sleep pressure based on previous sleep amount. If we have a good long nap, we may have a harder time falling asleep at night; conversely, if we pull an all-nighter partying on Sunday night, we are going to have a hard time at the office on the following morning. That is sleep homeostasis.

Is sleep homeostasis an unmodifiable, sovereign need in the animal or can it somehow be suppressed? Previous studies showed that migratory birds may be able to resist the temptation to sleep while flying above the ocean. Similarly, male pectoral sandpipers, a type of Arctic bird, can forego sleep in favour of courtship during the three weeks time window of female fertility. Could we find a similar behaviour in a genetically amenable animal model, like fruit flies?

In a “blind date” experiment, we forced interaction in a restricted space between socially naive, young, male fruit flies and receptive females. The interaction between the two led to an uninterrupted passionate courtship lasting the entire 24 hour period (and to one – and, in some cases, more – events of copulations). Surprisingly, not only did male flies forego sleep when prompted with a receptive female counterpart, but they also suppressed their natural sleep homeostasis and never recovered from the sleep lost courting. In the second set of experiments, we forcefully kept flies awake by employing robots that would automatically disturb the flies whenever they would fall asleep. At the end of the sleep deprivation treatment, flies would normally recover the lost sleep by having an extra nap. However, raising the sexual arousal of male flies by simply exposing them to the female pheromone, abolished their homeostatic need.

Ours is a study on the fundamental biological underpinnings of sleep. Our goal is to show that sleep is not a disconnected, uncontrollable phenomenon but a biological drive that can, in some conditions, be overcome. The study is particularly directed at other researchers and provides an important caveat not to be forgotten when conducting sleep experiments: it is possible to create an internal state in the animal that will heavily affect sleep regulation, without interfering with sleep regulatory circuits. A researcher may be artificially activating neurons that make an animal stressed, anxious, angered, or in love and all of these neurons will ultimately have an effect on sleep. Yet, they shall not be classified directly as “sleep neurons” or we will end up with a false map of where sleep neurons really are.


eLife 2017 Sep 12;6;e27445
Regulation of sleep homeostasis by sexual arousal
Esteban J. Beckwith, Quentin Geissmann, Alice S. French, and Giorgio F. Gilestro

Online published paper

Supplementary Material

Interactive supplementary videos
Supplementary movies as raw dataset DOI

Featured in:

eLife insight: Sleep: To rebound or not to rebound — Stahl BA, Keene AC

Video tracking and analysis of sleep in Drosophila melanogaster

Nat Protoc. 2012 Apr 26;7(5):995-1007.
Video tracking and analysis of sleep in Drosophila melanogaster.
Gilestro GF.

In the past decade, Drosophila has emerged as an ideal model organism for studying the genetic components of sleep as well as its regulation and functions. In fruit flies, sleep can be conveniently estimated by measuring the locomotor activity of the flies using techniques and instruments adapted from the field of circadian behavior. However, proper analysis of sleep requires degrees of spatial and temporal resolution higher than is needed by circadian scientists, as well as different algorithms and software for data analysis. Here I describe how to perform sleep experiments in flies using techniques and software (pySolo and pySolo-Video) previously developed in my laboratory. I focus on computer-assisted video tracking to monitor fly activity. I explain how to plan a sleep analysis experiment that covers the basic aspects of sleep, how to prepare the necessary equipment and how to analyze the data. By using this protocol, a typical sleep analysis experiment can be completed in 5-7 d.
Go to pubmedDownload PDFlink to the website

pySolo: a complete suite for sleep analysis in Drosophila

Bioinformatics. 2009 Jun 1; 25: 1466-1467
pySolo: a complete suite for sleep analysis in Drosophila
Giorgio F. Gilestro, Chiara Cirelli

pySolo is a multi-platform software for analysis of sleep and locomotor activity in Drosophila melanogaster. pySolo provides a user-friendly graphic interface and it has been developed with the specific aim of being accessible, portable, fast and easily expandable through an intuitive plug-in structure. Support for development of additional plug-ins is provided through a community website.
Availability: Software and documentation are located at http://www.pysolo.net. pySolo is a free software and the entire project is leased under the GNU General Public License.
Go to pubmedDownload PDFlink to the website

Widespread Changes in Synaptic Markers as a Function of Sleep and Wakefulness in Drosophila

Science. 2009 Apr 3;324(5923):109-12
Widespread Changes in Synaptic Markers as a Function of Sleep and Wakefulness in Drosophila
Gilestro GF, Tononi G, Cirelli C

Sleep is universal, strictly regulated, and necessary for cognition. Why this is so remains a mystery, though recent work suggests a link between sleep, memory, and plasticity. However, little is known about how wakefulness and sleep affect synapses. Using Western blots and confocal microscopy in Drosophila, we found that protein levels of key components of central synapses were high after waking and low after sleep. These changes were related to behavioral state rather than time of day and occurred in all major areas of the Drosophila brain. The decrease of synaptic markers during sleep was progressive and sleep was necessary for their decline. Thus, sleep may be involved in maintaining synaptic homeostasis altered by waking activities.

Go to pubmedDownload paper as PDFcommentary - Sciencecommentary - Cellcommentary - Nature Neuroscience