mne-bids-pipeline
mne-bids-pipeline copied to clipboard
BUG: Multiple rest run support
For example, using a simple config for ds004024:
RuntimeError: Found more than one matching data file for the requested recording. While searching:
BIDSPath(
root: /home/larsoner/mne_data/ds004024
datatype: eeg
basename: sub-CON001_ses-async14ms_task-rest)
Found 4 paths:
/home/larsoner/mne_data/ds004024/sub-CON001/ses-async14ms/eeg/sub-CON001_ses-async14ms_task-rest_run-02_eeg.vhdr
/home/larsoner/mne_data/ds004024/sub-CON001/ses-async14ms/eeg/sub-CON001_ses-async14ms_task-rest_run-03_eeg.vhdr
/home/larsoner/mne_data/ds004024/sub-CON001/ses-async14ms/eeg/sub-CON001_ses-async14ms_task-rest_run-01_eeg.vhdr
/home/larsoner/mne_data/ds004024/sub-CON001/ses-async14ms/eeg/sub-CON001_ses-async14ms_task-rest_run-04_eeg.vhdr
Cannot proceed due to the ambiguity. This is likely a problem with your BIDS dataset. Please run the BIDS validator on your data.
for now I'll use process_rest = False, but we should support subselecting a single rest run, or combining across runs. Maybe with process_rest: Union[Bool, List[str]] support to add to the existing bool support to allow specifying the run/runs if necessary? Then we'll need to concat if there are multiple.
Maybe with
process_rest: Union[Bool, List[str]]support to add to the existingboolsupport to allow specifying the run/runs if necessary? Then we'll need to concat if there are multiple.
For "task" runs, we have the settings
runsexclude_runscrop_runs
I wonder if we need to / should have all three for resting-state runs too?
this is for rest used as baseline right? if it's for a rest pipeline without events etc. it works?
Yes indeed, rest-as-baseline is this use case. I haven't tested task_as_rest = True, it might work already (but wouldn't fit this use case of wanting to use/process task data but also have process_rest = True so you could for example get a noise cov from the resting-state data, or just preproc the same way as runs so you could do connectivity analyses separately).