Skip to content
The International Brain Laboratory et al. (2020) A standardized and reproducible method to measure decision-making in mice. bioRxiv, 909838
Python
Branch: master
Clone or download
Cannot retrieve the latest commit at this time.
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.gitignore
LICENSE
README.md
create_list_uuids.py
dj_env.yml
dj_tools.py
figure1_training.py
figure1c_number_of_mice.py
figure2a_learningcurves_perlab.py
figure2b_time_to_trained.py
figure3a_psychfuncs_perlab.py
figure3c-e_variability_over_labs_level1.py
figure3f_decoding_lab_membership_level1.py
figure3g-i_variability_over_labs_level2.py
figure3j_decoding_lab_membership_level2.py
figure4a_block_probabilities.py
figure4b-e_psychfuncs_biased.py
figure4g_choice_history.py
paper_behavior_functions.py
requirements.txt
suppfig1_end_session_hist.py
suppfig4_variability_over_time.py
uuids_trained1.npy

README.md

paper-behavior

This repository contains code to reproduce all figures of the behavior paper by the International Brain Laboratory. If reusing any part of this code please cite the bioRxiv paper in which these figures appear.

Installation

These instructions require anaconda (https://www.anaconda.com/distribution/#download-section) for Python 3 and git (https://git-scm.com/book/en/v2/Getting-Started-Installing-Git)

In an Anaconda prompt window:

  1. Create a folder for this repository and go to that directory: cd <directory-you-want-this-in>
  2. Clone the repo: git clone https://github.com/int-brain-lab/paper-behavior.git and go into it cd paper-behavior
  3. Create a new conda environment: conda env create -f dj_env.yml
  4. Activate this environment: conda activate dj_env
  5. Install requirements: pip install -r requirements.txt
  6. Clone this in the same parent folder as this repo (only for figure 1; can do cd .. to come back to parent folder): git clone https://github.com/int-brain-lab/IBL-pipeline

Obtain a DataJoint account through IBL JupyterHub

IBL Jupyterhub provides an online environment to explore the IBL behavior data pipeline.

  1. Use your GitHub account to log in and go to the resource folder.
  2. Notebook 04-Access the database locally provides the instruction to obtain the credentials to access the database. Copy the value of dj.config
  3. In your local python IDE, do the following: a. import datajoint as dj b. set your local config variable dj.config with the value copied from JupyterHub c. dj.config.save_local()

You'll be able to run the code after the settings above.

How to run the code

All the scripts start with the name of the figure they produce. To run a script you need to add the local path of the repository to your Python environment so that the functions in paper_behavior_functions and dj_tools can be found. Either change the working directory of your Python IDE to the path where you cloned the repository or run the commands import_sys and sys.path.insert('~/path/to/repository'). All figure panels will appear in the exported_figs folder.

Questions?

If you have any problems running this code, please open an issue or get in touch with the code's authors (written at the top of each script).

You can’t perform that action at this time.