PyRAT: An Open-Source Python Library for Animal Behavior Analysis - De Almeida, Tulio Fernandes; Spinelli, Bruno Guedes; Hypolito Lima, Ramón; Gonzalez, Maria Carolina; Rodrigues, Abner Cardoso (Frontiers in Neuroscience, 2022)
Here we developed an open-source Python-based library called Python rodent Analysis and Tracking (PyRAT). Our library analyzes tracking data to classify distinct behaviors, estimate traveled distance, speed and area occupancy. To classify and cluster behaviors, we used two unsupervised algorithms: hierarchical agglomerative clustering and t-distributed stochastic neighbor embedding (t-SNE). Finally, we built algorithms that associate the detected behaviors with synchronized neural data and facilitate the visualization of this association in the pixel space. PyRAT is fully available on GitHub: https://github.com/pyratlib/pyrat.