This repository contains code to regenerate figures from:
Zaremba J.D*., Diamantopoulou A.*, Danielson N.B., Grosmark A., Kaifosh P.W., Bowler J.C., Sparks F.T., Liao Z., Gogos J.A., & Losonczy A. Impaired hippocampal place cell dynamics in a mouse model of the 22q11.2 deletion. Nature Neuroscience. 2017. doi: 10.1038/nn.4634
Figures are generated by individual python scripts. The repository also contains a helper script to install a project-specific python package, set the path to the raw data, and call the scripts.
Repository layout:
.
├── docker/ # Files for building a Docker image
├── enrichment_model/ # Code specific to the place cell enrichment model
├── expt_sets/ # JSON lists of experiments to include in each analysis
├── losonczy_analysis_bundle/ # Core project-specific code for all processing, analysis, and plotting
├── scripts/ # Individual Figure scripts
├── paths.cfg # Location of raw data files and output directory
├── run_scripts.py # Helper script to generate figures
└── README.md
- Python 2.7
- numpy >= 1.8
- scipy >= 0.13.0
- scikit-image >= 0.11.0
- scikit-learn >= 0.11
- shapely >= 1.2.14
- pillow >= 2.6.1
- future >= 0.14
- seaborn
- matplotlib
- pandas <= 0.19.2
- openCV
- SIMA
- pycircstat
On Windows, many of these packages are easiest to install from Christophe Gohlke's built wheels
Alternatively, all these requirements have been installed in a Docker image that will run all of the figure code (see Docker).
All scripts require raw data to first be downloaded. Data is available from the Dryad Digital Repository, doi: 10.5061/dryad.rq560 The data should be extracted and placed in a directory with the following structure:
.
├── behavior/ # Recordings of mouse behavior and treadmill position during experiment
├── enrichment_model/ # Place cell data, parameter fits, and saved enrichment model simulations
├── imaging/ # Processed calcium imaging traces for ROIs
└── metadata/ # Experiment parameters
This repository contains a custom Python module, the Losonczy Analysis Bundle (LAB),
which is the core means of handling and analyzing all of the data.
Once the data has been extracted and the dependencies installed, the run_scripts.py
script will handle the next steps. Change to the root directory of this repository
and enter:
python run_scripts.py
If this is the first time running this script, it will attempt to install the
Losonczy Analysis Bundle (LAB) module.
This will install the LAB module and make it importable by later scripts.
Next you will configure the scripts by identifying where the data is located
and where output files should be saved.
Finally, run_scripts.py
will provide a prompt to identify which figures to generate.
Docker is a container platform that can be used to pre-package software and data together in to an easy to execute format.
In order to run this code using Docker you first need to install the Docker engine (www.docker.com/get-docker). Specific install instructions will vary depending on your operating system.
Once the Docker engine is installed and running, you can pull down the pre-built image containing all of the data and code. In the Docker shell, terminal, or PowerShell available on your system type:
docker pull losonczylab/zaremba_nn_2017
This image is large (>15 GB), so it will take some time to download.
Finally, run the container and generate figures:
docker run -it --rm -v /PATH/TO/SAVE/FIGURES:/analysis losonczylab/zaremba_nn_2017
Version | Notes |
---|---|
v1.0 | Publication version. |