mne-bids-pipeline icon indicating copy to clipboard operation
mne-bids-pipeline copied to clipboard

BUG: Multiple rest run support

Open larsoner opened this issue 3 years ago • 3 comments

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.

larsoner avatar Nov 08 '22 20:11 larsoner

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.

For "task" runs, we have the settings

  • runs
  • exclude_runs
  • crop_runs

I wonder if we need to / should have all three for resting-state runs too?

hoechenberger avatar Nov 09 '22 19:11 hoechenberger

this is for rest used as baseline right? if it's for a rest pipeline without events etc. it works?

agramfort avatar Nov 13 '22 10:11 agramfort

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).

larsoner avatar Nov 15 '22 05:11 larsoner