Fly-voyeur

Automated fly tracking and courtship behavior scoring code

This project is maintained by sg-s

Fly Voyeur

Fly Voyeur

What this is

FlyVoyeur is a set of functions that allows you to track and quantify fly (Drosophila) behavior. It allows you to track Drosophila movement and behavior.

Originially developed for courtship assays, it can track the positions of flies, measure their orientation, detect wing extension, and can handle extreme cases of fly collisions, and is resistant to flies going missing due to skipped frames or sudden movement, and needs no special lighting conditions, and should work well even in non-uniform, variable lighting.

FlyVoyeur is fully parallelised, and can take advantage of CUDA-enabled GPUs to speed up tracking.

What this does

Out of the box, Fly-Voyeur quantifies:

  1. positions of all flies
  2. orientations of all flies
  3. times at which flies look at other flies
  4. collision statistics between flies
  5. times of copulation, if any, between flies
  6. times of wing extension between flies.

What you need to give it

  1. Videos of flies in circular arenas (see format support for details)

System Requirements

Video Format Support

  1. figure out what the dimensions of each frame are with square pixels and
  2. alter the ConvertVideo script

Credits

All code here was written by Srinivas Gorur-Shandilya. Contact me at http://srinivas.gs/contact/ This code came from a public repository at: https://github.com/sg-s/fly-voyeur

If you use this code or modify it, please write to me at code@srinivas.gs and I will tell you how to appropriately cite this.

Installation

git

If you know what git is, use:

git clone https://github.com/sg-s/fly-voyeur.git
git clone https://github.com/sg-s/srinivas.gs_mtools.git

automatic installation

To automatically download and install Fly-Voyeur, paste the following code in your MATLAB command window and press "Enter"

urlwrite('https://raw.githubusercontent.com/sg-s/fly-voyeur/master/install_Fly_Voyeur.m','install_Fly_Voyeur.m')
install_Fly_Voyeur;

Usage

  1. Type FlyVoyeur.m and hit enter

Release Notes

Support for parallel computation

MATLAB's parallel toolbox (matlabpool and parpool) is a disaster in some releases, based on the OS you run and the version of Java you have. If FlyVoyeur tells you parallel computation is not supported, you may have to resort to a number of tricks to get it working.

If you are using R2013a, see this page for a trick to get matlabpool to work correctly.

Support for GPU acceleration

The same goes for GPU acceleration. On Mac OS X, MATLAB fails to tell the OS to switch to the discrete card, and hence initialisation of GPU resources fails.