High-throughput behavior-dependent optogenetic stimulation of Drosophila.
SkinnerTrax tracks the positions of fruit flies (Drosophila) in real-time and uses the tracking information to illuminate the flies depending on their positions and actions. Flies can be genetically manipulated so that illumination is, e.g., a strong reward for them. Hence SkinnerTrax can automatically perform reinforcement learning experiments (it is named after B. F. Skinner). See also our paper Learning a Spatial Task by Trial and Error in Drosophila. For more engineering details on SkinnerTrax, see SkinnerTrax: high-throughput behavior-dependent optogenetic stimulation of Drosophila.
See below for a sample screenshot of SkinnerTrax in action training 20 flies, which got rewarded with 250 ms of illumination when they entered the circles. The right half of the image shows heatmaps, which are calculated in real-time and show the positional preferences of the flies. The illumination is visible for the arena in the second column of the third row, where the fly had just entered the circle.
Summary of the Features
- SkinnerTrax was written in pure Python, making the code relatively accessible
- SkinnerTrax is fast, enabling high throughput and real-time response using regular PCs
- SkinnerTrax has several features to make handling many cameras easier
- SkinnerTrax allows the LED controller hardware to be shared among several trackers and and provides low-latency and high-throughput communication with the hardware
- SkinnerTrax is multithreaded
- SkinnerTrax includes several stimulation rules ("protocols") and various helper functions to make writing stimulation rules easy
- SkinnerTrax includes real-time heatmaps
- SkinnerTrax writes detailed experimental records comprising multiple files
- SkinnerTrax was not designed to track multiple flies per arena
- we have never tried to use SkinnerTrax for animals other than flies
- SkinnerTrax is not really usable without any Python coding skills
- most of SkinnerTrax's features are accessible via command-line option only
See the Features page for much more details on the features.