https://github.com/int-brain-lab/paper-reproducible-ephys
https://github.com/int-brain-lab/paper-reproducible-ephys
Last synced: 4 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/int-brain-lab/paper-reproducible-ephys
- Owner: int-brain-lab
- License: mit
- Created: 2020-09-22T14:08:11.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2025-05-09T21:16:58.000Z (6 months ago)
- Last Synced: 2025-05-09T22:24:50.223Z (6 months ago)
- Language: Jupyter Notebook
- Size: 112 MB
- Stars: 3
- Watchers: 29
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
This repository contains code to reproduce figures from the
[(2025) Reproducibility of In Vivo Electrophysiological Measurements in Mice paper](https://doi.org/10.7554/eLife.100840.1)
The source code has been archived on [Software Heritage](https://archive.softwareheritage.org/browse/directory/694d5ac8f75ed01be5a288764a2b23ee04aba443/?origin_url=https://github.com/int-brain-lab/paper-reproducible-ephys&revision=f3a30b5eef55fbefa6bc8f400f56e38d6a4d92a1&snapshot=9e3531131d553090a4a9ceb55f2b9b7611d8e347)
# Installation
## Making a new python environment (optional)
Install [Anaconda](https://www.anaconda.com/distribution/#download-section) and [git](https://git-scm.com/downloads),
and follow their installer instructions to add each to the system path
Create new python environment
```
conda create --name ibl_repro_ephys python=3.9
```
Activate environment
```
conda activate ibl_repro_ephys
```
## Downloading and Installing repo
Clone the repo
```
git clone https://github.com/int-brain-lab/paper-reproducible-ephys.git
```
Navigate to repo
```
cd paper-reproducible-ephys
```
Install requirements and repo
```
pip install -e .
```
# Configuration
## Setting up ONE credentials
Open an ipython terminal
```
from one.api import ONE
pw = 'international'
one = ONE(silent=True, password=pw)
```
## Setting up saving scripts
By default data and figures will be saved into a folder with the figure name e.g fig_hist.
To find this location on you computer (for example for figure 1) you can type the
```
from reproducible_ephys_functions import save_data_path, save_figure_path
print(save_data_path(figure='fig_hist'))
print(save_figure_path(figure='fig_hist'))
```
If you want to override the location where the data and figures are saved you can create a script in the repo directory,
that is called reproducible_ephys_paths.py and add the following:
FIG_PATH = '/path/where/to/save/your/figures/'
DATA_PATH = '/path/where/to/save/your/data/
# Getting Started
## Reproducing the figures
In each figure subfolder there is a README that contains instructions for how to replicate the analysis and
generate the figures in the paper.
The subfolders correspond to the following figures
* Figure 1 - fig_intro, fig_data_quality
* Figure 2 - fig_hist
* Figure 3 - fig_ephysfeatures
* Figure 4 - fig_taskmodulation
* Figure 5 - fig_PCA
* Figure 6 - fig_spatial
* Figure 7 - fig_encodingRRR
* Figure 8 - fig_mtnn
* Figure 9 - fig_decoding
## Finding the insertions used for analysis
The list of insertions probe insertions considered for analysis in this version of the paper
can be found in the following way
```python
from one.api import ONE
from reproducible_ephys_functions import get_insertions
one = ONE()
insertions = get_insertions(level=0, one=one, freeze='freeze_2024_03')
```
## More detail about insertions used for each figure
A detailed overview of the criteria and insertions that have been used for each figure can be found in this
[spreadsheet](https://docs.google.com/spreadsheets/d/1_bJLDG0HNLFx3SOb4GxLxL52H4R2uPRcpUlIw6n4n-E)
# Running RIGOR metrics on your data
To run the RIGOR metrics on your own data please refer to [this notebook](RIGOR_script.ipynb)