Jeffrey E. Markowitz1,2,5, Winthrop Gillis1, Celion Beron1,2, Shay Neufeld1,2, Keiramarie Robertson1,2, Neha Bhagat1, Ralph Peterson1, Emalee Peterson1, Minsuk Hyun1,2, Scott Linderman3,4, Bernardo L. Sabatini1,2, Sandeep R. Datta1,#
1Department of Neurobiology, Harvard Medical School, Boston, Massachusetts, United States
2Howard Hughes Medical Institute, Chevy Chase, Maryland, United States
3Grossman Center for the Statistics of Mind, Columbia University, New York, New York, United States
4Departments of Statistics and Computer Science, Columbia University, New York, New York, United States
5Present address: Wallace H. Coulter Department of Biomedical Engineering, Georgia Institute of Technology and Emory University. Atlanta, Georgia, United States
#Corresponding Author
This contains code necessary to regenerate key figures and analysis from this paper. All code is in MATLAB and has been tested against versions up to 2022b. The directories are arranged as follows:
fig_scripts
MATLAB scripts to directly generate figure panels. It is recommended to clear the MATLAB workspace prior to running each script.lib
contains custom MATLAB classes and functions for data processing.preprocessing
contains MATLAB scripts to regenerate long-running intermediate computations. It is not necessary to run these prior to running the figure-generation scripts. These are included for completeness.third_party
useful third-party functions.
Installation instructions
- Download the repository onto your local machine.
- Add the path to the github repository (including subdirectories) to your MATLAB path. Note that you'll need the Signal Processing, Bioinformatics, Image Processing, and Parallel Computing Toolboxes installed.
How to obtain data.
-
Download data from Zenodo here . You should see the following directory structure after unzipping the data. Note that it is recommended to decompress the data in
~/Desktop
, which will create the directory~/Desktop/phanalysis_images
– this is the default path for loading data in most scripts.. ├── 1pimaging_dls │ └── phanalysis_object.mat ├── decoding_results │ ├── decoding_results_1pimaging_cell_types.mat │ ├── decoding_results_1pimaging_moseq_hierarchy.mat │ ├── decoding_results_1pimaging_ncells.mat │ ├── decoding_results_1pimaging_ncells_zoom.mat │ ├── decoding_results_1pimaging_twocolor_cell_types.mat │ ├── decoding_results_1pimaging_twocolor_pseudopop.mat │ ├── decoding_results_1pimaging_twocolor_withinanimal.mat │ ├── decoding_results_photometry_moseq_hierarchy.mat │ └── decoding_results_photometry_regress.mat ├── dls_lesion_round1 │ └── phanalysis_object.mat ├── dls_lesion_round2 │ └── phanalysis_object.mat ├── photomephys │ ├── ephys_kernel.mat │ └── photomephys_analysis.mat ├── photometry_a2a │ └── phanalysis_object.mat ├── photometry_crosstalk │ ├── both │ │ └── hifiber_object.mat │ ├── greenonly │ │ └── hifiber_object.mat │ └── redonly │ └── hifiber_object.mat ├── photometry_dls │ ├── lasso_distance.mat │ ├── modelr_randomizations.mat │ ├── modelr_randomizations_warped.mat │ └── phanalysis_object.mat └── photometry_nac └── phanalysis_object.mat
-
This contains everything you need to run the scripts in
fig_scripts
; this directory contains MATLAB scripts for generating panels from the manuscript. Be sure to clear all variables in between running scripts (clear all
).