Science Score: 49.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
○CITATION.cff file
-
✓codemeta.json file
Found codemeta.json file -
✓.zenodo.json file
Found .zenodo.json file -
✓DOI references
Found 6 DOI reference(s) in README -
✓Academic publication links
Links to: zenodo.org -
○Academic email domains
-
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (13.4%) to scientific vocabulary
Repository
Code related to the RIFF
Basic Info
- Host: GitHub
- Owner: jniediek
- License: mit
- Language: MATLAB
- Default Branch: main
- Size: 256 MB
Statistics
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 0
- Releases: 2
Metadata Files
Readme.md
Code related to the RIFF
The RIFF is an interactive arena for freely moving rats.
This repository contains code related to the publication
Jankowski M. M., Polterovich A., Kazakov A., Niediek J., Nelken I.: An automated, low-latency environment for studying the neural basis of behavior in freely moving rats.
BMC Biology 21, 172 (2023) https://doi.org/10.1186/s12915-023-01660-9
Folder structure
| Folder | Function of scripts |
|--------|---------|
| acquisition| to operate the RIFF |
|figures| to create the figures in the publication|
|processing | to process data generated in the RIFF |
|misc | to label rat bodyparts and train the direction tagger model |
Instructions
Note that some parts of the code require the Curve Fitting Toolbox, Parallel Computing Toolbox and/or the Statistics and Machine Learning Toolbox of MATLAB.
Folder acquisition: The control code of the RIFF
This code operates the RIFF. There are four subfolders
|Folder |Purpose|
|--------|-------|
|common| basic modules for interaction with the hardware |
|camera_tracker| controls the ceiling-mounted camera and extract the rats coordinates in real-time |
|L_D_task_GUI | main program to run the L/D task |
|St+_task_GUI | main program to run the St+ task |
We created wiki pages that explain how to create a new experiment in the RIFF, based on a modification of the L_D_task_GUI.
Folder figures: Reproducing figures from the manuscript
- Download/clone this repository
- Navigate Matlab to the subfolder of the
figuresthat you are interested in - Run the main script in that folder, called either
main.mor similar to the name to the figure.
Folder processing: Processing raw data that was recorded in the RIFF
Note: This is the short version. For a more complete description of the raw data, see our wiki pages.
1. Download/clone this repository
2. Download the sample session from figshare: 5 minutes behavioral session.
3. Unzip the downloaded sample session
4. Navigate Matlab to the code of this repository and add the folder processing with subfolders to the Matlab path
5. Navigate Matlab to the folder processing/analysis_pipeline and open the file main.m in the editor
6. Change the variable data_location to the location of the folder RIFF_data from the downloaded, unzipped sample session (e.g., data_location = '~/Downloads/RIFF_data')
7. Change the variable results_location to your desired location for the output of results (e.g., results_location = '~/RIFF_results'). This folder will be created if it does not exist already.
8. Run the script main.m
9. Diagnostic plots of the results appear in folder .../RIFF_results/nightRIFF/250721/rat_9/01_Behavior
12. Run the script RIFF_player.m.
12. Copy the ~/RIFF_results path into the Pipeline output path input line in the left upper corner of the GUI. Press the button Load data.
13. Once the first frame of the experiment got loaded, right-click anywhere on the dark image area and use the left/right arrows to advance the frames. Use keys 4 and 6 in the numpad to skip 5 frames at once (make sure the NumLock is activated).
Here is how the exemplar exeperiment is visualized in the RIFF_player:

Other resources
We also supply a 90 minute long sample session with neural recordings here. See our wiki pages for instructions.
Processing the rat body directions (requires python framework and CUDA-enabled PC)
- Create new virtual environment (e.g., open anaconda/conda/miniconda command window and type
>> conda create -n RIFF_env python=3.7) - Activate the newly created environment:
>> conda activate RIFF_env - Change working directory of the console to
./processing/analysis_pipeline/body_directions/:>> cd ./processing/analysis_pipeline/body_directions/ - Install the requirements:
>> pip install -r requirements.txt - Change the variable
exp_pathin line 152 ofextract_3_points_from_rat_images.pyto the path of theRIFF_resultsfolder. - Run the code by:
>> python extract_3_points_from_rat_images.py. The code will create a new filepredicted_rat_body_points.matin the experiment folder. - Rerun the RIFF_player as in bullets 10-13 of the previous list to visualize he body directions.
Owner
- Name: Johannes Niediek
- Login: jniediek
- Kind: user
- Location: The Hebrew University of Jerusalem, Israel
- Company: Edmond & Lily Safra Center for Brain Sciences
- Website: https://countable.space
- Repositories: 2
- Profile: https://github.com/jniediek
neural code
GitHub Events
Total
- Watch event: 2
Last Year
- Watch event: 2
Dependencies
- PyPrind ==2.11.3
- matplotlib ==3.6.2
- numpy ==1.23.5
- h5py *
- matplotlib *
- numpy *
- scipy *
- torch ==1.9.0
- torchaudio ==0.9.0
- torchvision ==0.10.0