-
Notifications
You must be signed in to change notification settings - Fork 5
Analysis Module
This section will demonstrate how to run a session in the Analysis Module:
-
After installation, launch BehaviorDEPOT from the App tab within Matlab.
-
Select which classifiers to use:
- Certain classifiers have adjustable parameters. Click on ‘Edit Params’ to adjust those parameters.
-
Set distance calibration
- Calibration can be calculated using ImageJ. Open a frame from a video and measure out the pixel distance of a known dimension (e.g. arena length). Use that to calculate the pixel-to-centimeter ratio.
-
Enter number of custom ROIs (in addition to classifier-based ROIs, e.g. Elevated Plus Maze, Open Field Test)
-
Choose whether or not to filter based on frame-locked events
- Input for these is required to be a spreadsheet file (.csv, .xlsx), with each event as a row, the start frame in the first column and the end frame in the second column.
-
Select plotting preferences
- ‘View Spatial Trajectory’ plots all the positions of the animal across the session.
- ‘View spatiotemporal trajectory’ plots position across time, color coding the location points.
- ‘View behavior location’ overlays a marker on the locations where behavior(s) of interest occurred.
-
Select single session or batch process
- Single session for analyzing one paired DLC output and video file.
- Batch process for analyzing multiple files with the same parameters. The required input structure for batch processing:
- Grandparent folder, which is selected for analysis.
- Parent folder 1 (Containing exclusively a single, matching pair of spreadsheet and video files) A single event file can also be included, and must be indicated with ‘cue’ in the filename (eg myevents_cue.csv)
- Parent folder 2 (same as above)
- Parent folder n (same as above)
- Grandparent folder, which is selected for analysis.
-
Hit Start.
-
Follow the onscreen prompts to enter and customize your data. Depending on your settings:
- If doing ‘single session’, you will be prompted to use the directory browser to select the spreadsheet and video files for analysis.
- If doing ‘batch process’, you will be prompted to select the folder containing directories for analysis (see batch process instructions for data organization)
- You may be prompted by the GUI to draw and name ROIs or parts of the arena, depending on your settings.
- You will be prompted to select the body part corresponding to your custom named part.
- You may be prompted to select timestamp files containing the start and stop frames of temporal events, and then name those events.
-
Results will be saved in a new folder in the same directory as the data.
-
Save manual annotations as a 3 column table (1st: Start Frame, 2nd: Stop Frame, 3rd: Behavior Label)
- Function is compatible with data tables in .mat or .csv files ** To import data from larger excel/csv files, select "import data" in Matlab and create 3 column tables for each video analyzed. After importing data as a table, save the table file as a .mat
-
Run convertHumanAnnotations function in Matlab
- Inputs:
-
- table_filename: str/char pointing to MATLAB table file (requires path if not in current directory)
-
- total_frames: int, optional total number of frames in analyzed video
- NOTE: if total_frames is empty, function will use the video file IF IN SAME FOLDER AS INPUT TABLE
-
- output_filename: str/char, optional; (default behavior = hB_[original filename])
-
- Inputs:
-
Results will be saved as an hBehavior structure (similar in format to Behavior structures from Analysis Module)
- File name will be 'hB_[original filename]' or named as [output_filename] if applicable