mne-tools / mne-bids-pipeline

Automatically process entire electrophysiological datasets using MNE-Python.
https://mne.tools/mne-bids-pipeline/
BSD 3-Clause "New" or "Revised" License
143 stars 68 forks source link

source/_04_make_forward seems to be looking for the wrong file #1011

Closed ellisdg closed 3 weeks ago

ellisdg commented 4 weeks ago

Hello and thank you for this fantastic tool!

I am trying to run the pipeline including source analysis on some of my data. I have been able to get the processing to work as expected until I get to the computation of the forward solution where it throws a file does not exist error. It seems to be searching for the file in the BIDS directory, but without "proc-tsss" in the filename. Is there a way that I can fix this?

Error:

┌────────┬ source/_04_make_forward ──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────── │17:00:06│ ⏳️ sub-12preop Computing head ↔ MRI transform from matched fiducials │17:00:06│ ❌ sub-12preop A critical error occurred. The error message was: File does not exist: /mydata/david.ellis/meg/bids_test/sub-12preop/meg/sub-12preop_task-motorupperbilateral_meg Did you mean one of: sub-12preop_task-motorupperbilateral_proc-tsss_meg.fif sub-12preop_task-motorupperbilateral_proc-tsss_meg.json sub-12preop_task-motorupperbilateral_proc-tsss_events.tsv instead of: sub-12preop_task-motorupperbilateral_meg

Aborting pipeline run. The traceback is:

File "/usr/local/lib/python3.9/dist-packages/mne_bids_pipeline/steps/source/_04_make_forward.py", line 166, in run_forward trans = _prepare_trans_subject( File "/usr/local/lib/python3.9/dist-packages/mne_bids_pipeline/steps/source/_04_make_forward.py", line 80, in _prepare_trans_subject trans = get_head_mri_trans( File "", line 12, in get_head_mri_trans File "/usr/local/lib/python3.9/dist-packages/mne_bids/read.py", line 1158, in get_head_mri_trans raw = read_raw_bids(bids_path=meg_bids_path, extra_params=extra_params) File "", line 12, in read_raw_bids File "/usr/local/lib/python3.9/dist-packages/mne_bids/read.py", line 845, in read_raw_bids raise FileNotFoundError(msg)

Thank you, David

welcome[bot] commented 4 weeks ago

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

hoechenberger commented 3 weeks ago

Hello @ellisdg, could you please share the configuration file you're using?

larsoner commented 3 weeks ago

I suspect you set proc = 'tsss' but we (mistakenly) don't pass this when looking for the relevant BIDSPath, but indeed the relevant config file would help us know for sure!

ellisdg commented 3 weeks ago

Yes, that is correct, I set proc='tsss'. Here is the configuration file I am using (Github won't let me attach a ".py" file so I added ".txt" as the extension): mne_bids_pipeline_config.py.txt Thanks!

larsoner commented 3 weeks ago

Can you try the branch from https://github.com/mne-tools/mne-bids-pipeline/pull/1014 ?

ellisdg commented 3 weeks ago

Yes, that worked! I was able to run the pipeline and it found the correct file. Thank you!