Skip to content

AlbertLeei/social_competiton_elo_rating

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

43 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Behavioral Dataframe Processing

Overview

  • This project helps calculate the ELO rating 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 ratings 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 ratings will be calculated after each interaction.

Repository Organization

  • ./jupyter_notebooks
    • Directory that has the Jupyter Notebooks to calculate the ELO ratings and create the accompanying dataframes/plots. These notebooks will be copied into ./results
  • ./results
    • Directory to store individual analysis. We recommend naming the folder in this convention: {date}_{overall experiment name}_{protocol}
      • e.g. 20221220_pilot3_tubetest
  • ./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.
  • ./conda_environment
    • Directory to create and store the Conda Environment to run Jupyter Notebooks and calculate ELO score.

Steps To Take

Step 0: Learn how to use the Command Line

  1. Before starting, you must pick a program for your Command-line interface.

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

Step 1(GUI Version). Clone this repository

  1. If using Windows or Mac, install the Github GUI from https://desktop.github.com/

  2. Open the Github Desktop application, and click File >> Clone Repository

  3. Click on the URL tab, and copy the link to the repository into the Repository URL prompt.

  4. Choose the path that you want to clone the Github Repository into and click Clone

    • We recommend: {user_directory}/Documents/Github
  5. Go to the folder of the Github Repository, and open up the terminal to that folder.

    • If you right click in the file explorer, there will usually be an option to open the terminal from the folder. If not, then open the terminal and navigate to the folder with cd {user_directory}/Documents/Github/social_competiton_elo_rating

Step 1(Command Line Version). Clone this repository

  1. 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

  1. 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}

2.1 Download the Github repository with the command: git clone https://github.com/padillacoreanolab/social_competiton_elo_rating - NOTE: Every time you use this repo after cloning it, check for updates with: - cd {./path/to}/social_competiton_elo_rating - git pull origin main

Step 2. Create Conda Environment to Install Necessary Python libraries

  1. Check if you have Anaconda:

  2. Create the Conda environment by following the instructions in: ./conda_environment/README.md

    • 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}/elo_rating_env

Step 3. Run each Data Processing/Analysis Jupyter Notebooks

  1. Follow the instructions to run the Jupyter Notebooks at ./jupyter_notebooks/README.MD
    • NOTE: The dataframes and the plots should be saved in the subdirectories in the folder you created: Similar to./jupyter_notebooks/proc

Resources

ELO rating

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Jupyter Notebook 99.6%
  • Other 0.4%