Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Errors on running source steps on resting-state EEG data #777

Open
Ammar-Elsaeed opened this issue Aug 10, 2023 · 4 comments
Open

Errors on running source steps on resting-state EEG data #777

Ammar-Elsaeed opened this issue Aug 10, 2023 · 4 comments

Comments

@Ammar-Elsaeed
Copy link

Ammar-Elsaeed commented Aug 10, 2023

Hi,
I am using the pipeline to do preprocessing and source reconstruction on TUH EEG data.
On version 1.3.0, running the preprocessing steps command works:
mne-bids-pipeline --config config_tuab_eeg.py --steps=preprocessing

but running the source steps with this command:
mne-bids-pipeline --config config_tuab_eeg.py --steps=source
produces an error:
🐛 source/_04_make_forward sub-00000 ses-000 A critical error occurred. The error message was: missing in_files["info"] = path_to_bids_root/derivatives/path_to_sub_data/sub-xxxxx_ses-xxx_task-rest_ave.fif

Starting post-mortem debugger.
<traceback object at 0x7f6ec83143c0>

/home/ammar/anaconda3/lib/python3.10/site-packages/mne_bids_pipeline/run.py(172)hash()
-> assert v.exists(), f'missing in_files["{k}"] = {v}'
(Pdb)

upon further inspection, it seems that "ave" refers to an ERP/evoked average file. However, the "evoked" analysis in the "sensor" step is skipped because our data is resting state. f we set "task_is_rest=False" in the config, then it'll look for event names when epoching the data, and ultimately produce an error.

I am following this github repository.
here is the config file being used, except for minor changes:
1- use_template_mri = 'fsaverage'
2- tried commenting out the variable, or setting it as follows: source_info_path_update = {'processing': 'clean',
'suffix': 'epo'}

@welcome
Copy link

welcome bot commented Aug 10, 2023

Hello! 👋 Thanks for opening your first issue here! ❤️ We will try to get back to you soon. 🚴🏽‍♂️

@hoechenberger
Copy link
Member

Hello @Ammar-Elsaeed,

I don't think we ever implemented any processing for resting-state data beyond epoching and ICA. We create epochs based on the configuration settings rest_epochs_duration and rest_epochs_overlap.

What exactly would you expect to happen in later processing steps? Would you like to see source estimation on the continuous, cleaned resting-state data?

Thanks,
Richard

@Ammar-Elsaeed
Copy link
Author

Hello @hoechenberger , Thanks for your reply.

Yes we would like to do source estimation on the data.
Note that our data here is resting state data that we cleaned via autoreject using the pipeline (hence at the end of the preprocessing step it is epoched data).
Our goal is to compute a covariance matrix of source activity over the entire recording rather than per epoch.
So, how do we compute the source activity from the epoched resting-state data using the pipeline?

Thanks,
Ammar

@hoechenberger
Copy link
Member

So, how do we compute the source activity from the epoched resting-state data using the pipeline?

This is currently not possible: somebody would need to implement this.

What you can do in the meantime is take the artifacts the current pipeline generates (cleaned data) and process those manually via MNE.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants