Hi,
I am trying to reproduce this analysis pipeline on ds000248 from openneuro.org using mne-bids-pipeline. At the source analysis stage, I get the error below.
(my_mne1.2) [ma09@login-j01 ~]$ mne_bids_pipeline --config=/imaging/davis/users/ma09/Projects/MNE_bids_pipeline_test/my_config.py --steps=source
[2022-10-21 13:02:14] ╶╴👋 Welcome aboard the MNE BIDS Pipeline!
[2022-10-21 13:02:14] ╶╴🧾 Using configuration: /imaging/davis/users/ma09/Projects/MNE_bids_pipeline_test/my_config.py
[2022-10-21 13:02:14] ┌╴🚀 scripts/init/_00_init_derivatives_dir Now running 👇
[2022-10-21 13:02:14] └╴🎉 scripts/init/_00_init_derivatives_dir Done running 👆 ⟮1s⟯
[2022-10-21 13:02:14] ┌╴🚀 scripts/init/_01_find_empty_room Now running 👇
[2022-10-21 13:02:14] │ ✅ init/_01_find_empty_room sub-01 run-01 Computation unnecessary (cached) …
[2022-10-21 13:02:14] └╴🎉 scripts/init/_01_find_empty_room Done running 👆 ⟮1s⟯
[2022-10-21 13:02:14] ┌╴🚀 scripts/source/_01_make_bem_surfaces Now running 👇
[2022-10-21 13:02:14] │ 🔍 source/_01_make_bem_surfaces sub-01 Computation unnecessary (output files exist) …
[2022-10-21 13:02:14] └╴🎉 scripts/source/_01_make_bem_surfaces Done running 👆 ⟮1s⟯
[2022-10-21 13:02:14] ┌╴🚀 scripts/source/_02_make_bem_solution Now running 👇
[2022-10-21 13:02:14] │ ✅ source/_02_make_bem_solution sub-01 Computation unnecessary (cached) …
[2022-10-21 13:02:14] └╴🎉 scripts/source/_02_make_bem_solution Done running 👆 ⟮1s⟯
[2022-10-21 13:02:14] ┌╴🚀 scripts/source/_03_setup_source_space Now running 👇
[2022-10-21 13:02:14] │ ✅ source/_03_setup_source_space sub-01 Computation unnecessary (cached) …
[2022-10-21 13:02:14] └╴🎉 scripts/source/_03_setup_source_space Done running 👆 ⟮1s⟯
[2022-10-21 13:02:14] ┌╴🚀 scripts/source/_04_make_forward Now running 👇
[2022-10-21 13:02:14] │ ✅ source/_04_make_forward sub-01 Computation unnecessary (cached) …
[2022-10-21 13:02:14] └╴🎉 scripts/source/_04_make_forward Done running 👆 ⟮1s⟯
[2022-10-21 13:02:14] ┌╴🚀 scripts/source/_05_make_inverse Now running 👇
[2022-10-21 13:02:14] │ ✅ source/_05_make_inverse sub-01 Computation unnecessary (cached) …
[2022-10-21 13:02:14] └╴🎉 scripts/source/_05_make_inverse Done running 👆 ⟮1s⟯
[2022-10-21 13:02:14] ┌╴🚀 scripts/source/_99_group_average Now running 👇
[2022-10-21 13:02:14] │ ⏳️ source/_99_group_average A critical error occurred. The error message was: subjects_dir does not exist: /imaging/ma09/Projects/AVSpeechMEG/data/derivatives/anat
Aborting pipeline run. The full traceback is:
Traceback (most recent call last):
File "/home/ma09/.conda/envs/my_mne1.2/lib/python3.10/site-packages/mne_bids_pipeline/config.py", line 2794, in wrapper
out = memory.cache(func)(*args, **kwargs)
File "/home/ma09/.conda/envs/my_mne1.2/lib/python3.10/site-packages/mne_bids_pipeline/config.py", line 2886, in wrapper
func(*args, **kwargs)
File "/home/ma09/.conda/envs/my_mne1.2/lib/python3.10/site-packages/mne_bids_pipeline/scripts/source/_99_group_average.py", line 123, in run_group_average_source
mne.datasets.fetch_fsaverage(subjects_dir=config.get_fs_subjects_dir())
File "<decorator-gen-590>", line 12, in fetch_fsaverage
File "/home/ma09/.conda/envs/my_mne1.2/lib/python3.10/site-packages/mne/datasets/_fsaverage/base.py", line 67, in fetch_fsaverage
subjects_dir = _set_montage_coreg_path(subjects_dir)
File "/home/ma09/.conda/envs/my_mne1.2/lib/python3.10/site-packages/mne/datasets/_fsaverage/base.py", line 128, in _set_montage_coreg_path
old_subjects_dir = get_subjects_dir(None, raise_error=False)
File "/home/ma09/.conda/envs/my_mne1.2/lib/python3.10/site-packages/mne/utils/config.py", line 381, in get_subjects_dir
subjects_dir = _check_fname(
File "<decorator-gen-0>", line 12, in _check_fname
File "/home/ma09/.conda/envs/my_mne1.2/lib/python3.10/site-packages/mne/utils/check.py", line 245, in _check_fname
raise FileNotFoundError(f'{name} does not exist: {fname}')
FileNotFoundError: subjects_dir does not exist: /imaging/ma09/Projects/AVSpeechMEG/data/derivatives/anat
In my_config.py I specify the following directories:
bids_root: Optional[PathLike] = os.path.join('/imaging', 'davis', 'Projects', 'Openneuro_datasets', 'ds000248')
deriv_root: Optional[PathLike] = os.path.join('/imaging', 'davis', 'users', 'ma09', 'Projects',
'MNE_bids_pipeline_test', 'ds000248', 'derivatives',
'mne-bids-pipeline')
subjects_dir: Optional[PathLike] = os.path.join(bids_root, 'derivatives', 'freesurfer', 'subjects')
The directory in the error message is one that I used ages ago when I analyzed a different dataset using mne-python, which doesn’t exist anymore and I don’t quite understand where mne-bids-pipeline finds its path and why it tries to use that as subject_dir instead of what I specified in my_config.py.
Could anyone plese advise how to solve this issue?
Many thanks,
Máté
System details:
- MNE version: 1.2
- mne-bids-pipeline version: 0.1.dev628+g8ad5b0e
- operating system: Centos 7