Code package for extracting, cleaning, and visualizing electrophysiological data from optogenetic mapping experiements. Not 100% tested, under development.
- Clone/fork repo and install package.
- Update sCRACM.ini file database and ephys data paths in a text editor a. path_database should be the full path to where your metadata file is stored b. path_ephys_data should be the full path to the folder where your cleaned and analyzed data will be stored c. filename_cell_db should be the name of your metadata.csv file
- Ensure your metadata file contains proper column headers, reference test_database.csv provided in sample_data.
Analyzing a single cell is quick and easy, and many cells can be processed quickly, after a long day of experiments. Run command:
from sCRACM_analysis.analysis import cleanData
%matplotlib inline #for plotting in notebook
cleanData.analyzeSCRACMmap(numOfMaps,saveFlag=True)
anaylzeSCRACMMap takes 2 arguments, the number of maps you want to average, and an optional save flag (default = False). This command will open a file dialogue box for the user to select the XSG files that are to be averaged, as well as a .tif image taken during the experiment for soma depth and cortical thickness measurements. When the .tif image is opened measure soma depth of the cell, and cortical thickness of the slice for the column where the soma is present. Measurements are converted to microns and displayed after each click. To close the .tif image, press any key.
Example:

The function will output summary information for the cell, as well as analysis plots for quality control. If the save flag is True, the user will be prompted to enter a filename for the analysis, and a .csv file with the processed data will be stored in the path_ephys_data directory. Name all files with the CellID_analysis.csv convention!
Important: Once file is saved, open, and enter the measured values for soma depth and cortical thickness. If your mapping grid was aligned with stimulation points not covering the tissue, add a layer1Row value as well!
Example output plots:

The analyzeData module contins multiple functions for screening cellular input maps, averaging maps based on catagorical groupings, and other useful plotting functions. Map averaging:
Page through all maps of a group:

To overlay a neuron tracing over the sCRACM map for that cell, run the overlaySWC command. First, the neuron tracing will be plotted. Contirm that the tracing has the correct orientation (ie anterior to the left). During SWC processing, the x-axis can be flipped, so this step is important. Select the proper acute slice .tif image, and the neuron will be plotted over the input map.




