Skip to content

GUI application for analyzing raw data of IR-beam Open Field tests and animal locomotor activity measurements.

License

Notifications You must be signed in to change notification settings

ArseniyPelevin/open-field-statistics

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

98 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Open Field Statistics

Description

Open Field Statistics is a GUI application for analyzing animal's locomotor activity in an open field box, tracked by IR-beams crossing. It receives raw data from beams in a .csv file, visualizes animal's trajectory and calculates some behavioral statistics in user-defined zones and time periods. The output statistics can then be saved in a new spreadsheet.

This application was developed to process the output of a commercial third-party system and software with closed source code. The external program operates the hardware, receives signals from the IR-beams and produces the .csv file with the raw data. However, it fails to perform a comprehensive and scientifically relevant analysis of the data, motivating development of the current application.

Although this application is originally narrow-purposed, reflecting constraints of the third-party software, it can easily be repurposed for a wider range of custom photobeam setups, provided that they produce represent data in a compatible format.

This implementation is clearly an overkill for the task, but it served me as practice in full-stack development and deployment of GUI applications.

Hardware and raw data

The third-party apparatus is a 40x40x30 cm box with two 16x16 photobeam frames. The lower frame tracks animal's horizontal activity (X and Y coordinates), and the upper frame detects the vertical activity (rearings).

The raw data produced by external software operating the system itself (and the input data for the current application) is a ;-separated .csv file with six columns:

  • timestamp with update rate of ~12 Hz
  • X1 and X2 - leftmost and rightmost intersected beams by the X axis
  • Y1 and Y2 - downmost and uppermost intersected beams by the Y axis
  • Z with True/False values, reflecting breaks of any of the upper beams

Note that since only the extreme coordinates are shown in the table, the program cannot differentiate between two objects simultaneously breaking photobeams.

Example_raw_data_Excel Raw_data_representation

Interface

Application_GUI

Features

Time intervals

User can select a time range of the experiment to analyze (slider in the bottom-left corner). It can be useful, for example, to exclude a habituation period from the beginning of the record. The table and the output file will show both Total time and Selected time statistics.

The Selected time can be further divided into periods of user-defined length in seconds. For each of the periods separate statistics will be shown.

Zones

The statistics is calculated for the Whole field and for user-defined zones. Seven types of zone selection can be chosen with buttons to the left of the map:

Three options divide the whole field into two predefined zones.

Area button - vertical halves Two vertical halves

Area button - horizontal halves Two horizontal halves

Area button - wall/center One central and one peripheral zone. This field division is often used in behavioral science to assess anxiety and stress in animals.

Zones_horizontal_halves Zones_wall_center

Four options allow user to set their own zones. The maximal number of custom zones is 4. After completing selection of a new zone user has to press Add zone button. Only one type of custom zone can be used at once (I am planning to change it in the future).

Area button - one cell One cell at a time. Allows the most flexible zone definition

Area button - vertical line A vertical line

Area button - horizontal line A horizontal line

Area button - concentric square A concentric square

Zones_vertical_lines Zones_concentric_squares

Statistics

For each zone/period the following five behavioral statistics are calculated:

  • Time (s) spent in this zone (for the Whole field - the length of this period)
  • Distance (cm)
  • Velocity (cm/s)
  • Rearings number
  • Rearings time (s)

Output

Output is a .csv file. By default user is prompted to save it to the save folder as the input in the format 'Input_file_name_statistics.csv', but both location and name can be changed.

Output_table

Future development

  • Add option to choose field configuration and number of beams
  • Make zone selection more flexible: allow different zone types simultaneously, support custom zone elements of different sizes, add drag-select
  • Add number of zone entering statistics
  • Save parameters
  • Add animation of the recording with different speed

Credits

This software was developed as part of my research work in the Laboratory of Neurobiology and Molecular Pharmacology of the Institute of Translational Biomedicine of St Petersburg University, under the scientific supervision of Dr. Anna B. Volnova ORCID logo

About

GUI application for analyzing raw data of IR-beam Open Field tests and animal locomotor activity measurements.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages