DOI: 10.5061/dryad.fbg79cp5k
title: Analysis dataset from: Simultaneous dual-color calcium imaging in freely-behaving mice

description: Miniaturized fluorescence microscopes (miniscopes) enable imaging of
 calcium events from a large population of neurons in freely behaving
 animals. Traditionally, miniscopes have only been able to record
 from a single fluorescence wavelength. Here, we present a new
 open-source dual-channel Miniscope that simultaneously records two
 wavelengths in freely behaving animals. To enable simultaneous
 acquisition of two fluorescent wavelengths, we incorporated two CMOS
 sensors into a single Miniscope. To validate our dual-channel
 Miniscope, we imaged hippocampal CA1 region that co-expressed a dynamic
 calcium indicator (GCaMP) and a static nuclear signal (tdTomato) while
 mice ran on a linear track. Our results suggest that, even when
 neurons were registered across days using tdTomato signals, hippocampal
 spatial coding changes over time. In conclusion, our novel
 dual-channel Miniscope enables imaging of two fluorescence wavelengths
 with minimal crosstalk between the two channels, opening the doors to a
 multitude of new experimental possibilities.
description: # Analysis dataset from: Simultaneous dual-color calcium imaging in
 freely-behaving mice
 [https://doi.org/10.5061/dryad.fbg79cp5k](https://doi.org/10.5061/dryad.fbg79cp5k) ## Description of the data and file structure This is the dataset accompanying manuscript ["Simultaneous dual-color calcium imaging in freely-behaving mice"](https://www.biorxiv.org/content/10.1101/2024.07.03.601770v1) ### Files and variables #### File: intermediate\_ds.zip **Description:** this is the intermediate data that can be used to reproduce analysis in the manuscript without needing raw data. Refer to [this README](https://github.com/denisecailab/miniscope_2s-validation/blob/resubmission0/analysis/cv_exp0/README.md) (also provided below)for how to use them. Upon extraction, the zip contains following content: * `/cross_reg/[green or red]/*`: cross-session registration results for green or red channel. `cents.pkl` stores centroids of cells; `dist.pkl` stores pair-wise distance of cells; `mappings.pkl`, `mappings_meta.pkl` and `mappings_meta_fill.pkl` contains raw, registered and filled mappings; `shiftds.nc` contains intermediate registration dataset. * `/drift/*`: results related to drifting analysis. `fr.feat` contains tables of firing rates; `metric.feat`, `metric_agg.feat` and `ovlp.csv` contains the raw, aggregated and selected metrics for overlapping cells; `pv_corr.feat` and `pv_corr_agg.csv` contains the raw and aggregated population vector correlations; `pv_corr_mat.feat` contains the raw place cell firing rates across sessions. * `/frame_label/*`: contains behavior results. `behav.feat` and `behav_v4.feat` contains the frame-by-frame behavior labels for dual-channel and single channel Miniscopes; `fm_label.nc` contains intergrated frame labels. * `/processed/[green or red]/*`: processed calcium data for green or red channel. The files are named as `[animal]-[session].nc`. * `/register_g2r/*`: results of registration between green and red channel. * `Agn/*`, `Agn_trans`, `Ared/`: contains spatial footprints of green channel, registered (transformed) green channel, and red channel. Files are named as `[animal]-[session].nc`. * `proj_gn_trans`: contains projections of raw data onto the registered green spatial footprints. Files are named as `[animal]-[session].nc` * `cells_im.pkl`: contains footprint images for cells. * `g2r_mapping.csv`, `g2r_mapping_corr.csv`, `g2r_mapping_lsm.csv` contains the mapping generated by mutual-minimum, footprint correlation, and linear sum assignment methods. * `green_mapping_reg.pkl` and `red_mapping_reg.pkl` contains the cross-session mappings after registration for green and red channel. * `green_reg_pactive.csv` contains the activation probability table for green channel. ### Content of Additional [README](\(https://github.com/denisecailab/miniscope_2s-validation/blob/resubmission0/analysis/cv_exp0/README.md\)) This is the master analysis folder for dual channel imaging experiment. To reproduce all analysis, make sure you have `data` folder available. Then, run all the `.py` scripts in order (scripts starting with the same number can be run in parallel). To reproduce individual figures in the manuscript from intermediate results, check details in the section below. #### Reproducing individual figures * Figure 3 * Requires: * `intermediate/frame_label/behav.feat` * `intermediate/frame_label/behav_v4.feat` * Run: * `02.compare_behavior.py` * Output: * Panel B: `figs/behav_comparison/example.svg` * Panel C: `figs/behav_comparison/comparison.svg` * Figure 4 * Requires: * `intermediate/processed/green` * `intermediate/processed/red` * `log/sessions.csv` * `intermediate/cross_reg/red/mappings_meta_fill.pkl` * `intermediate/cross_reg/green/mappings_meta_fill.pkl` * Run: * `04.register_g2r.py` * Output: * Panel A: `figs/register_g2r/cells/m22-A_example.svg` * Panel B: `figs/register_g2r/overlap_ncell.svg` * Panel C: `figs/register_g2r/overlap_prop.svg` * Figure 5 * Requires: * `intermediate/processed/green` * `intermediate/processed/red` * `log/sessions.csv` * `intermediate/cross_reg/red/mappings_meta_fill.pkl` * `intermediate/cross_reg/green/mappings_meta_fill.pkl` * Run: * `04.register_g2r.py` * Output: * `figs/register_g2r/traces.svg` * Figure 6 * Requires: * `data/wavelength/fpbase_spectra_EGFP.csv` * `data/wavelength/et600-50m.txt` * `data/wavelength/et525-50m.txt` * Run: * `04.register_g2r.py` * Output: * Panel A: `figs/register_g2r/crosstalk_wavelength.svg` * Panel B: `figs/register_g2r/crosstalk_distribution.svg` * Figure 7 * Requires: * `intermediate/processed/green` * `intermediate/processed/red` * `log/sessions.csv` * `intermediate/cross_reg/red/mappings_meta_fill.pkl` * `intermediate/cross_reg/green/mappings_meta_fill.pkl` * Run: * `04.register_g2r.py` * Output: * `figs/register_g2r/summary_agg.svg` * Figure 8 * Requires: * `log/sessions.csv` * `intermediate/processed/green` * `intermediate/frame_label/fm_label.nc` * `intermediate/cross_reg/green/mappings_meta_fill.pkl` * `intermediate/cross_reg/red/mappings_meta_fill.pkl` * `intermediate/register_g2r/green_mapping_reg.pkl` * Run: * `05.drift_analysis.py` * Output: * Panel A: `figs/drift/actMean-place_cells.svg` * Panel B: `figs/drift/py_corr-place_cells.svg` ## Code/software [https://github.com/denisecailab/miniscope_2s-validation](https://github.com/denisecailab/miniscope_2s-validation)