HBCD EEG Utilities🔗

DOI HBCD_EEG_Utilities

The HBCD EEG Utilities repository contains MATLAB scripts to compute EEG derivatives (HBCD-EEG-Utilities.m) and to plot these derivatives (hbcd_checkderivatives.m, facePipeline.m, mmnPipeline.m, rsPipeline.m, vepPipeline.m) from HBCD EEG .set files that have been processed with the HBCD-MADE pipeline. An additional script (hbcd_createfilelist.R) can be used to generate a random list of files for plotting.

These utilities are designed for users of HBCD EEG data who wish to examine or use derivatives code developed by the HBCD EEG Working Group. See Derivatives and ERP Specifications for a description of outputs.

HBCD_EEG_Utilities.m calls on a series of functions contained in HBCD-EEG-Utilities/supplemental files. Functionality of the software is as follows:

  • Load HBCD EEG .set files
  • Computes derivatives for each selected task
  • Saves trial-level and summary statistics output per participant for the VEP, MMN, and FACE tasks
  • Saves power spectrum output for the RS task
  • Writes subject-level summary statistics and trial measures output tables as .csv files
  • Concatenates all subjects' summary statistics output into a single spreadsheet for each task
  • Concatenates all subjects' trial measures output into a single spreadsheet for each task

hbcd_checkderivatives.m calls functions to automatically plot derivatives for each task at each assessment. The script assumes the user is providing a list of files for plotting (hbcd_createfilelist.R can be used to generate such a list). Users can define which tasks they would like to plot if they do not wish to plot all tasks. hbcd_checkderivatives.m will:

  • Load HBCD EEG derivatives .set files
  • Automatically generate output folders by task and assessment
  • Create and export appropriate plots for each task (ex: ERPs, topoplots, power spectral density plots)

Functionality🔗

The following MATLAB scripts and .json files in the HBCD-EEG-Utilities repository are required for processing.

|__ HBCD-EEG-Utilities/
    |
    |__ HBCD_EEG_Utilities.m #load data, compute mean amplitude, generate output tables
    |
    |__ supplemental files/
        |
        |__compute_peaks_latencies.m #compute adaptive mean and latency measures for VEP
        |__concatenate_files_summary.m #combine all subjects' summary statistics into one .csv
        |__concatenate_trial_measures.m #combine all subjects' trial data into one .csv
        |__get_Cluster.m #define clusters used for ROIs
        |__grab_settings.m #read in processing settings from proc_settings_HBCD.json
        |__RS_ERP_Topo_Indv.m #calculates power values for RS and save output to .csv files
        |__proc_settings_HBCD.json #specify processing settings

The following MATLAB scripts in the HBCD-EEG-Utilities repository are required for plotting.

|__ HBCD-EEG-Utilities/
    |__ hbcd_checkderivatives.m #primary script calling task functions
    |__ facePipeline.m #function to plot face task
    |__ mmnPipeline.m #function to plot mmn task
    |__ rsPipeline.m #function to plot resting state task
    |__ vepPipeline.m #function to plot vep task

The following R script in the HBCD-EEG-Utilities repository can be used to generate a random list of files for plotting.

|__ HBCD-EEG-Utilities/
    |__ hbcd_createfilelist.R #generate a random list of files for plotting

Contents🔗