1.3 Phase: session analysis - shunnnli/NeuroDAP GitHub Wiki

Overview

During this phase, relevant behavior events and neural signals will be extracted, stored, and plotted. Although you need to write your own version of analyzeSessions_XXX(), building block functions are provided and the whole struct will be as follows:

  1. Load all session-related data
  2. Filled in key information of the session if needed.
  3. (Optional) further signal preprocessing
  4. Generate trial table
  5. Extract all important events worthy of analysis (analysisEvents). Also find their corresponding trial number (eventTrialNum) and define their corresponding name (analysisLabels)
  6. Run analyzeTraces(analysisEvents,analysisLabels,eventTrialNum=eventTrialNum)
  7. (Optional but highly recommend) Design session summary plots and loop through all signals

After running, relevant files/plots will be stored within the same session folder. You can use a script to preprocess & analysis batch of sessions together. See Shun_loadSessionData.m

Requirements

  1. Your own version of method analyzeSessions_XXX() should contain inputs for details about task structures, stimulation params, and other necessary information for future reference. These metadata will be stored in params struct in sync_sessionName.mat
  2. Use function createDatajointFiles() for generating files that is required for ingestion into the Sabatini Datajoint pipeline.
  3. Although not strictly required, running analyzeTraces() is highly recommended to facilitate future analysis across animals and sessions (see "Phase 4: experiment analysis").

Action items

  1. Copy file analyzeSessions_template.m in the tutorials folder. Modified the copied version to create your own version of analyzeSessions_XXX().
  2. Copy file getTrialTable_template.m in the tutorials folder. Modified the copied version to create your own version of getTrialTable_XXX().
  3. Follow the instruction in each section of analyzeSessions_template.m to create your own analysis pipeline.