|Home | About | Journals | Submit | Contact Us | Français|
Summary: pySolo is a multiplatform 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 released under the GNU General Public License.
Over the past decade, the field of sleep research has met a novel renaissance, upon the introduction of a restricted number of animal organisms that have been exploited as genetic models. Behaviorally defined sleep-like states have been characterized in several animal species—including fish, flies and worms—and genetic analyses in these systems are revealing a remarkable conservation in the underlying mechanisms controlling sleep behavior (Zimmerman et al., 2008a).
Among these, Drosophila melanogaster has emerged as a particularly successful candidate for the investigation of the molecular mechanisms of sleep. Flies share all the fundamental features of mammalian sleep: their sleep is homeostatically regulated independent of the circadian clock, is modulated by stimulants and hypnotics, and it is affected by age. Since the first descriptions of Drosophila sleep in the year 2000 (Hendricks et al., 2000; Shaw et al., 2000), several genetic screens have already been conducted and several short sleeping mutants have been isolated and at least partially characterized, providing new important insights into the biology of sleep (Cirelli and Bushey, 2008).
In Drosophila, sleep is defined as a sustained period of quiescence associated with an increased arousal threshold and it is therefore indirectly measured as lack of activity over time. Activity of the fly is normally monitored either through an infrared-based system (recording the number of times a single fly breaks an infrared beam) or through video recording. The first system is considered to be the current standard but it allows only recording of individual flies and with a very limited spatial resolution; it is commercially available although relatively expensive. The video analysis, on the other hand, is still in an experimental phase (Zimmerman et al., 2008b): it offers a virtually unlimited spatial resolution, it is able to identify the smaller movements and it allows for recording of more than one fly in the same chamber. No standard exists for software analysis of the data and most laboratories use custom-made programs based on common office spreadsheet software in combination with commercial scripting or mathematical software, such as Statsoft Statistica or Mathworks Matlab. Unfortunately, the lack of a standard accepted solution does not facilitate sharing and diffusion of novel analysis algorithms; moreover, the current hardware and software solutions are relatively expensive and this introduces an obstacle to the expansion of the field.
With pySolo, we wish to introduce a complete suite for sleep analysis in Drosophila that includes an inexpensive yet powerful video recording solution and a versatile software for analysis of video as well as of traditional (infrared based) data.
pySolo (named after the Italian word for nap, pisolo) has been written entirely in Python, using the wxPython architecture for the construction of a user-friendly graphic user interface (GUI). Data are stored and interpreted as multi-dimensional array objects and fast computation is achieved using the NumPy and SciPy scientific libraries. Graphical output is handled by the matplotlib library for production of publication quality figures in a variety of hardcopy formats. The software will run on all the major operating systems that are able to run Python 2.5, including most Microsoft Windows, MacOS and Linux; binary versions for Windows and Mac that do not require installation of Python are also available for download on the website.
The suite is divided in two parts: a first section provides database-like capabilities for storage of the experimental information and retrieval of the raw data. A second part offers an intuitive and expandable platform for the actual data analysis.
Data insertion in the database is spry and straight forward. All the information regarding single experiments can be stored in a single file and can be easily retrieved by the user through a system of multiple tagging. In addition to keeping record of the past experiments, the database software is responsible for collecting and elaborating the raw data. The format accepted by default is the one of the TriKinetics system—based on infrared motion detection of individual flies—but the software can be easily customized to accept different kind of raw data. An extension that allows video analysis of flies activity is also provided, and instructions are available on the website detailing how to create an inexpensive recording station using common high-definition USB webcams.
After information about the single experiment has been entered in the database, the software proceeds to fetch the data and calculate sleep amount. In accordance with previous literature, sleep is defined as ≥5 min of complete inactivity (Shaw et al., 2000). The resulting computation is saved as a binary file and compressed (up to a 50× factor), ready to be analyzed using the second portion of the program.
The second part of pySolo provides the actual platform for data analysis and manipulation. An intuitive GUI allows selecting individual flies, individual days or individual monitors for the analysis. Any smaller or larger portion of the data, if deemed inappropriate or unusable, can be excluded with a click of the mouse from the overall analysis.
The rightmost part of the analysis frame is organized as a notebook in which each different tab is a different plug-in providing a different kind of analysis. The current distribution of pySolo provides about 15 different algorithms for detection of the most commonly used sleep parameters, including sleep amount (minutes per 24 h), activity index (counts per minute), sleep fragmentation (N of 1-min awakenings), sleep latency, response to and efficiency of sleep deprivation. Multiple selection or comparison of different data on the same panel or graph is possible. All graphs can be exported as image files, both in vectorial format (such as EPS, SVG or PDF) or bitmap images (TIFF or PNG). Similarly, all numerical data can easily be exported to a spreadsheet compatible format.
It is important to stress that one of the strength of the software lies in its expandability. We expect the number and the typology of possible analysis to increase constantly with time. Every panel is encoded by a single file and a full featured analysis with graphical output can be achieved by coding as little as 50 lines. The basic functions offered by the GUI are automatically shared transparently by all panels. The mathematical libraries used for computation (NumPy and SciPy) and the plotting library (matplotlib) adopt a syntax that is similar (but not identical) to the one used in the commercial software Matlab. This makes the transition for Matlab user relatively easy. Users are invited to share on the website their experiences and eventually their custom developed plug-ins, to be adopted by their colleagues.
Importantly, given the nature of the software, it will be extremely easy in the future to integrate different types of scientific analysis that rely on the same starting data, such as analysis of the circadian activity or longevity (Rosato and Kyriacou, 2006).
The field of sleep research in invertebrates has been growing constantly over the past few years. Many laboratories have turned to the study of sleep in D.melanogaster as it offers an efficient, inexpensive and yet powerful animal model for elucidating the genetics of sleep. Here we presented pySolo, a software that has been created with the aim of becoming a standard method for the analysis of sleep in Drosophila.
The authors would like to thank M. Sandal for the initial suggestion of using Python, T. Morey and D. Bushey for β-testing of the software and the website. All the software and files are distributed under GPL license as open source material. Documentation is released under GNU Free Documentation License (GFDL).
Funding: National Institute of General Medical Sciences (R01 GM075315 to C.C.).
Conflict of Interest: none declared.