sccn / EEG-BIDS

21 stars 17 forks source link

Run numbers for multi-task sessions are all or nothing #184

Closed neuromechanist closed 1 year ago

neuromechanist commented 1 year ago

In the case of multi-task sessions where some of the tasks have several runs and others are single-run experiments, we would need to use the run-X suffix for the BIDS files with multiple runs, but this suffix is not necessary for the single-run tasks.

Currently, Matlab tools only support adding runs to every task by adding the run field to the data.

The desired behavior is to check for each task to see if more than one run is listed, and if so, add the run-X to the file name.

The example dataset is the HBN EEG dataset, which has three runs for the contrast difference detection paradigm and two runs for the symbol search paradigm.

The current code for creating the BIDS dataset uses the data structure with subject, file, task, and run field names. The task and run fields for a subject with complete datasets are:

BIDS_task_name = {'RestingState', 'DespicableMe', 'FunwithFractals', 'ThePresent', 'DiaryOfAWimpyKid',...
    'contrastChangeDetection', 'contrastChangeDetection', 'contrastChangeDetection', ...
    'surroundSupp', 'surroundSupp', 'seqLearning', 'symbolSearch'};
BIDS_run_seq = [1,1,1,1,1,...
    1,2,3,...
    1,2,1,1];

For SCCN developers, the code to create the BIDS dataset is available under neuromechanist/HBN_BIDS_analysis#10; it is not yet merged to Main as we are working on event clarification for HED annotation. The sample results are available on the nemar disk under yahya/cmi_bids_R3_20.

Here is a screenshot of the output for one subject:

image