- This project helps extract and process MED-PC (https://www.med-associates.com/med-pc-v/) recording data. The overall goal is to train mice to associate a tone with a reward(sugary liquid). MED-PC records the times that the tones are played, when the mice enter/exit the port where the reward is dispensed, and the relevant metadata. The experiment is usually run with one subject for a recording that takes about a hour for multiple days. The data processing will calculate various metrics that displays or averages all the trials(each tone going off in a session and it's associated port entry/exit) for each recording session for all the subjects.
- This project helps calculate the ELO score for different social competition assays. The data collected for these assays are Excel sheets that are used during the recording. The assays includes tube test, urine marking, home cage observation, and reward competition. ELO scores keep track of the overall performance for a given subject, which can be compared to other subjects within the same cage to approximate the "ranking". Because the assays have multiple recordings for each subject, the ELO scores will be calculated after each interaction.
- ./jupyter_notebooks
- Directory that has the Jupyter Notebooks to extract/process the MED-PC and the accompanying dataframes/plots that are created from it.
- ./results
- Directory that has a record of previous iterations of the Jupyter Notebooks
- ./src
- Directory that has the Python source code used in the Jupyter Notebooks. All the original functions used in the notebooks will be imported from this.
TODO
: Add sections onconda environments
andscripts
- Directory that has the Python source code used in the Jupyter Notebooks. All the original functions used in the notebooks will be imported from this.
- The Command-line interface is where we type in commands to make a computer do various tasks. This interface is presented by programs that are usually called the "terminal."
- For more information: https://en.wikipedia.org/wiki/Command-line_interface
https://code.visualstudio.com/Download
- Before starting, you must pick a program for your Command-line interface.
- For Mac, we recommend the Terminal application.
- Instructions on how to use the Terminal: https://macpaw.com/how-to/use-terminal-on-mac
- Video Tutorial: https://www.youtube.com/watch?v=MBBWVgE0ewk
- For Windows, we recommend using the Command Prompt
- Instructions on how to use the Command Prompt: https://www.cs.princeton.edu/courses/archive/spr05/cos126/cmd-prompt.html
- Video Tutorial: https://www.youtube.com/watch?v=aKRYQsKR46I
- For Mac, we recommend the Terminal application.
1.1 When editing and reading code, it is helpful to use a code editor that has features specific to programing. We recommend downloading Visual Studio Code. - Download Link: https://code.visualstudio.com/Download
- Check if you have the Git program on your computer. Open up Command-line interface program. We recommend Command Prompt for Windows, and Terminal for Mac.
1.1 In the terminal, type git
then enter.
- Documentation of Git should be displayed if it is properly installed on your computer. If it says that command is not recognized or that the program doesn't exist, then install it with one of the following instructions:
- Windows: https://garnet-rotate-01f.notion.site/Git-Installation-with-Windows-09e4f9f13c9f47c48c8d02a1f7647704
- Mac: https://garnet-rotate-01f.notion.site/Git-Installation-with-Mac-b5e51901e97b4c65a114bb25bc9f2dfa
- Once you have Git, download the repository in a folder that you want to save it in. To move to the desired folder, type the following command into your Command-line interface program:
cd {/path/to/folder}
- Replace
{/path/to/folder}
with the absolute or relative path to the folder that you want to save the Github repository in. We recommend creating a folder for programming related projects. - More information on what an absolute or relative path is:
- Replace
2.1 Download the Github repository with the command: git clone https://github.com/padillacoreanolab/behavioral_dataframe_processing
- NOTE: Every time you use this repo after cloning it, check for updates with:
- cd {./path/to}/behavioral_dataframe_processing
- git pull origin main
-
Check if you have Anaconda:
- Type
python
in your terminal, and then pressEnter
. If you have Anaconda, then it will say "Anaconda" somewhere in the output. - If you don't have Anaconda, follow the installation instructions:
- Type
-
Create the Conda environment by following the instructions in: ./conda_environment/environment_install.sh
- NOTE: This step only needs to be done once. Every subsquent time you want to run the analysis, you'll turn on the Conda environment with:
conda deactivate
conda activate {./path/to}/behavioral_processing_env
- NOTE: This step only needs to be done once. Every subsquent time you want to run the analysis, you'll turn on the Conda environment with:
- Type the command
jupyter notebook --allow-root
in your terminal, and then press inter
1.1 If a browser window doesn't pop up with Jupyter notebooks, open up a browser window. Then copy and paste the URL given in the command line to the address bar. It will be followed by To access the notebook, open this file in a browser:
and Or copy and paste one of these URLs:
- It should have a format similar to: http://localhost:8888/?token=gsOH0vx373NRzHUmDzwX9TFzBf5Wx6czWIr1irV7ERKBLmlK
- Click on ./jupyter_notebooks in the Jupyter Notebooks GUI (Should be in the web browser)
- Follow the instructions to run the Jupyter Notebooks at ./jupyter_notebooks/README.MD
- NOTE: The dataframes and the plots should be saved in subdirectories in: (./jupyter_notebooks/proc)[./jupyter_notebooks/proc]