Skip to content

Workflow for ECoG Patients and Analysis

Andrew Bartuska edited this page Apr 25, 2017 · 1 revision

Timeline for Tasks

Before Patient

  1. Consent occurs
  2. Make sure behavioral tasks are up-to-date and working on task computer
  3. Verify patient number

With Patient

  1. Run tasks with patient
  2. Note the following for each session
    • Patient number
    • Date
    • Day post-surgery
    • Task
      • Time of start, stop (for each task and for session)
      • Notes about patient during task (attention, focus, fatigue, etc.)
      • Any modifications made to task (speed, length, etc) or interruptions

After Patient

  1. Back-up data (json files) from task computer to external hard drive ASAP.
  2. Use AWS Converter to covert json files to standard format for uploading to AWS.
  3. Merge triggers pulled from json file and ecog file using Generalizable Trigger Merger.
    • Need two csv files - one from behavioral data, one from ecog data.
  4. Convert edf file to fif file using EDF/FIF Converter.
    • FIF file will likely be split into multiple smaller files from single large EDF file. As long as they are kept together, MNE will read them together by providing name of first FIF file only.
  5. Analysis (see below).

Files

Files Needed for Analysis

  • ECoG data (.fif/edf)
  • Merged trigger data (.csv)
  • Behavioral data (.json)
  • Analysis files (.json)
    • By patient (need to create new one for each new patient)
    • By task (need to create new one for each new task)

Additional Important Files

  • ECoG Map

Directory Set-up

  • ecog_data_analysis (folder) Should be git repository ecog_data_analysis_notebooks which will include analysis documents and example notebooks.

    • All analysis json files with parameters (one per patient and one per task)
    • notebooks (jupter notebook)
    • patient_2002 (folder)
      • ECoG data (edf/fif)
      • merged trigger (csv)
      • ECoG Map
      • behavioral_data_2002 (folder)
        • ToM_Loc_2002.json
  • Note: ecog_data_analysis_notebooks contains example notebooks that can be generalized across patients (and for some, across tasks). The main notebooks in the git repo should not be edited for each patient, but should be copied locally and renamed, not to be included on Github. This will allow for other people to work from same notebooks on similar analyses without disrupting example notebooks. Example notebooks should be clean, clear, and generalizable, if additional notebooks are created.

  • Note: Analysis documents (for patients and tasks) should also be included on Github when new ones are created.

Analysis

Notebooks

There are several example notebooks in ecog_data_analysis_notebooks from which to start analyses. The main framework, as of 4/24/17, includes the following (with accompanying notebooks):

  • ERP/Time-frequency/Hilbert Transform
  • Time-frequency
  • Hilbert Transform/Average Power
    • This notebooks calculates average power during a certain period of trial and compares means between conditions.

See also Andrew's thesis materials for a rough idea of figure presentation and analysis from processed files to figures.