A software for sleep analysis in Drosophila


Sleep deprivator

Needed components.

For Video analysis:
– the latest version of pySolo Video from github [link]
– the following necessary Python components installed on the PC:

Python version: 2.7.6
WX Version:
scipy Version: 0.13.1
scipy Version: 1.8.0
matplotlib Version: 1.3.1
opencv Version: 2.4.7

You can make sure that everything that is needed is correctly installed by runnin this script.

For sleep deprivation:
– the latest firmware version from github [link]
– the control client on the PC [link]
– pySerial [link]
– the Arduino suite [link] alone or together with the Xloader program for firmware updates [link, windows only]

Getting started

  1. Install all the software components needed, as per above.
  2. Make sure that the machine has the latest firmware installed. To check this, connect the machine via the USB port and run sleepDeprivator.py --checkVersion
  3. Update the firmware if necessary. Current version is 0.99

To start the sleep deprivation in automatic mode (ie. without video tracking)

  1. Make sure the machine is connected via USB
  2. Run the command sleepDeprivator.py --automatic
  3. The tubes will start rotating at semi random intervals, independently of the activity of the flies.

To start the sleep deprivation in smart mode (ie. only when flies are asleep)

  1. Start the pysolo video software using the pvg.py program
  2. Set the options appropriately. For most common uses, only the folders will have to be specified. Everything else can be left as default.
  3. In the “Live View” select “monitor 01” from the dropdown box. Video playback showing your flies should start.
  4. Create the mask. The easiest way to create the mask is to select the four outmost corners of the 32 tubes: bottom-right, bottom left, top-right, top-left (FIG1).
  5. You should obtain a cross-like structure (FIG2)
  6. Now you can specify that you want this area to be equally divided into 32 slots: using your keyboard type “32a”
  7. If you are happy with how the mask encompasses the single tubes, press the button Save and Apply. Otherwise type “x” and try making another mask
  8. Close the programme

When it’s time to start acquisition

  1. Start pysolo video (pvg.py) and make sure the settings are as in FIG4
  2. Hit Acquire
  3. Now the activity of the flies is recorded in a txt file called Monitor01.txt

When it’s time to start sleep deprivation

  1. WITH pySolo-Video running, navigate to the folder containing the file sleepDeprivator.py
  2. start the programme with the following syntax: sleepDeprivator.py -d /path/to/Monitor01.txt –daemon
  3. This will start the sleep deprivation activity

To upgrade the firmware.

  1. Download the current firmware from github and save it on your desktop as firmware.hex
  2. Use Xloader to upload to the machine via USB. The settings for the upload are Arduino MEGA 2560 and COM port may vary depending on your machine but normally is the one with the highest number (COM4? COM5?).

Comments are closed.

pySolo sign up form

Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur excepteur sint occaecat cupidatat non

pySolo login form