Loading set files (LEMON EEG dataset) into braintstorm

I am trying to load data from subjects from LEMON dataset http://fcon_1000.projects.nitrc.org/indi/retro/MPI_LEMON/downloads/download_EEG.html with this code (I never loaded/linked data before)

cd('/Volumes/ExtremePro/Analyses/LEMON/RAW/EEG_Preprocessed_BIDS_ID/EEG_Preprocessed')

files_EO=dir('sub*/sub*.set');

sFiles = [];
nsubj= 50; 

firstSubject = 191;
lastSubject = 203;
%%% 

% make subject names
for i = firstSubject:lastSubject
    db_reload_database('current');
    subjectname{i} = files_EO(i,1).name(1:13);
    [sSubject{i}, iSubject] = db_add_subject(subjectname{i});

end
      

for i = firstSubject:lastSubject
    % Process: Create link to set file
   
    sFiles = bst_process('CallProcess', 'process_import_data_epoch', sFiles, [], ...
        'subjectname',  subjectname{i}, ...
        'condition',     '', ...
        'datafile',      {{strcat(files_EO(i,1).folder, '/', files_EO(i,1).name)}, 'EEG-EEGLAB'}, ...
        'iepochs',       [], ...
        'eventtypes',    '', ...
        'createcond',    0, ...
        'channelalign',  1, ...
        'usectfcomp',    1, ...
        'usessp',        1, ...
        'freq',          [], ...
        'baseline',      [], ...
        'blsensortypes', 'MEG, EEG');

end

What I am doing wrong?
According to site the data should contain epoched eeg data, but brainstorm doesnt detect it as a epoched data

Second question: how I can do source reconstruction with this dataset (with default standard template)? I didnt found examples or sample scripts that I can learn

Hi @Danieltomasz,

A good place to start with Brainstorm is the Get Started tutorials
https://neuroimage.usc.edu/brainstorm/Tutorials#Get_started

If you have are already familiar with Brainstorm GUI, this other tutorial explains the basics on scripting within Brainstorm:
https://neuroimage.usc.edu/brainstorm/Tutorials/Scripting

It seems the Preprocessed Data is not epoched, and the information on the EEG protocol does not indicated it's epoched either.
https://fcp-indi.s3.amazonaws.com/data/Projects/INDI/MPI-LEMON/Compressed_tar/EEG_MPILMBB_LEMON/EEG_Info

As alternative, you can import the entire continuous data (480 s for EC) and split it in 60-s blocks.

% Process: Import MEG/EEG: Time
sFiles = bst_process('CallProcess', 'process_import_data_time', sFiles, [], ...
    'subjectname',   subjectname{i}, ...
    'condition',     '', ...
    'datafile',      {{strcat(files_EO(i,1).folder, '/', files_EO(i,1).name)}, 'EEG-EEGLAB'}, ...
    'timewindow',    [], ...
    'split',         60, ...
    'ignoreshort',   0, ...
    'channelalign',  1, ...
    'usectfcomp',    1, ...
    'usessp',        1, ...
    'freq',          [], ...
    'baseline',      [], ...
    'blsensortypes', 'MEG, EEG');

There is the Source estimation tutorial:
https://neuroimage.usc.edu/brainstorm/Tutorials/SourceEstimation

Best,
Raymundo

1 Like