Using fMRIprep-rodent. Validate data on online BIDS-validator. Passes without errors. Try to use fMRIprep-rodents tool. Get what I assume is BIDS-related error.
Command used (and if a helper script was used, a link to the helper script or the command generated):
Data formatted according to a validatable standard? Please provide the output of the validator:
As mentioned, passes test on online validator. I get a few warnings, but no errors
Relevant log outputs (up to 20 lines):
Traceback (most recent call last):
File "/opt/conda/bin/fprodents", line 8, in <module>
sys.exit(main())
File "/opt/conda/lib/python3.8/site-packages/fprodents/cli/run.py", line 17, in main
parse_args()
File "/opt/conda/lib/python3.8/site-packages/fprodents/cli/parser.py", line 634, in parse_args
validate_input_dir(
File "/opt/conda/lib/python3.8/site-packages/fprodents/utils/bids.py", line 148, in validate_input_dir
subprocess.check_call(["bids-validator", bids_dir, "-c", temp.name])
File "/opt/conda/lib/python3.8/subprocess.py", line 364, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['bids-validator', PosixPath('/bids_dataset'), '-c', '/tmp/tmpaghsvbjh']' returned non-zero exit status 1.
There should have been output from the validator in addition to the Python traceback from calling out to it. Since the error is not FileNotFound, the validator is installed and should have produced some output.
Thank you for the swift reply! I have managed to fix the issue. It was because I did not mount /bids_data, very silly. However, I now run into:
Running fMRIPREP version 0.0.2+83.gd153551:
* BIDS dataset path: /bids_dataset.
* Participant list: ['01'].
* Run identifier: 20230123-143151_7ab13fbc-46f3-4da5-8554-25049e8b72e1.
* Output spaces: Fischer344:res-native.
Process Process-2:
Traceback (most recent call last):
File "/opt/conda/lib/python3.8/multiprocessing/process.py", line 315, in _bootstrap
self.run()
File "/opt/conda/lib/python3.8/multiprocessing/process.py", line 108, in run
self._target(*self._args, **self._kwargs)
File "/opt/conda/lib/python3.8/site-packages/fprodents/cli/workflow.py", line 81, in build_workflow
retval["workflow"] = init_fmriprep_wf()
File "/opt/conda/lib/python3.8/site-packages/fprodents/workflows/base.py", line 50, in init_fmriprep_wf
single_subject_wf = init_single_subject_wf(subject_id)
File "/opt/conda/lib/python3.8/site-packages/fprodents/workflows/base.py", line 246, in init_single_subject_wf
anat_preproc_wf = init_anat_preproc_wf(
File "/opt/conda/lib/python3.8/site-packages/fprodents/patch/workflows/anatomical.py", line 289, in init_anat_preproc_wf
anat_template_wf = init_anat_template_wf(
File "/opt/conda/lib/python3.8/site-packages/smriprep/workflows/anatomical.py", line 681, in init_anat_template_wf
StructuralReference(
File "/opt/conda/lib/python3.8/site-packages/nipype/interfaces/freesurfer/base.py", line 244, in __init__
super(FSCommandOpenMP, self).__init__(**inputs)
File "/opt/conda/lib/python3.8/site-packages/nipype/interfaces/freesurfer/base.py", line 134, in __init__
self.inputs.subjects_dir = self._subjects_dir
File "/opt/conda/lib/python3.8/site-packages/nipype/interfaces/base/traits_extension.py", line 135, in validate
self.error(objekt, name, str(value))
File "/opt/conda/lib/python3.8/site-packages/traits/base_trait_handler.py", line 74, in error
raise TraitError(
traits.trait_errors.TraitError: The 'subjects_dir' trait of a RobustTemplateInputSpec instance must be a pathlike object or string representing an existing directory, but a value of '/opt/freesurfer/subjects' <class 'str'> was specified.
Hmm. This looks like a quirk of a FreeSurfer tool we use that always takes a subjects_dir input even if it doesn’t use it. The simplest thing might be to pass an environment variable SUBJECTS_DIR=/tmp.