Hi, I am trying to use fMRIPrep but keep encountering the same error:
Node: fmriprep_wf.single_subject_23807_wf.func_preproc_ses_1_task_tapping_run_01_wf.bold_reg_wf.fsl_bbr_wf.compare_transforms
Working directory: /Analysis/bids_and_fmriprep_setup/bids_working_2/fmriprep_wf/single_subject_23807_wf/func_preproc_ses_1_task_tapping_run_01_wf/bold_reg_wf/fsl_bbr_wf/compare_transforms
Node inputs:
function_str = def compare_xforms(lta_list, norm_threshold=15):
"""
Computes a normalized displacement between two affine transforms as the
maximum overall displacement of the midpoints of the faces of a cube, when
each transform is applied to the cube.
This combines displacement resulting from scaling, translation and rotation.
Although the norm is in mm, in a scaling context, it is not necessarily
equivalent to that distance in translation.
We choose a default threshold of 15mm as a rough heuristic.
Normalized displacement above 20mm showed clear signs of distortion, while
"good" BBR refinements were frequently below 10mm displaced from the rigid
transform.
The 10-20mm range was more ambiguous, and 15mm chosen as a compromise.
This is open to revisiting in either direction.
See discussion in
`GitHub issue #681`_ <https://github.com/poldracklab/fmriprep/issues/681>`_
and the `underlying implementation
<https://github.com/nipy/nipype/blob/56b7c81eedeeae884ba47c80096a5f66bd9f8116/nipype/algorithms/rapidart.py#L108-L159>`_.
Parameters
----------
lta_list : list or tuple of str
the two given affines in LTA format
norm_threshold : float (default: 15)
the upper bound limit to the normalized displacement caused by the
second transform relative to the first
"""
from niworkflows.interfaces.surf import load_transform
from nipype.algorithms.rapidart import _calc_norm_affine
bbr_affine = load_transform(lta_list[0])
fallback_affine = load_transform(lta_list[1])
norm, _ = _calc_norm_affine([fallback_affine, bbr_affine], use_differences=True)
return norm[1] > norm_threshold
lta_list = ['/Analysis/bids_and_fmriprep_setup/bids_working_2/fmriprep_wf/single_subject_23807_wf/func_preproc_ses_1_task_tapping_run_01_wf/bold_reg_wf/fsl_bbr_wf/fsl_to_lta/mapflow/_fsl_to_lta0/out.lta', '/Analysis/bids_and_fmriprep_setup/bids_working_2/fmriprep_wf/single_subject_23807_wf/func_preproc_ses_1_task_tapping_run_01_wf/bold_reg_wf/fsl_bbr_wf/fsl_to_lta/mapflow/_fsl_to_lta1/out.lta']
norm_threshold = <undefined>
Traceback (most recent call last):
File "/usr/local/miniconda/lib/python3.7/site-packages/nipype/pipeline/plugins/multiproc.py", line 69, in run_node
result['result'] = node.run(updatehash=updatehash)
File "/usr/local/miniconda/lib/python3.7/site-packages/nipype/pipeline/engine/nodes.py", line 472, in run
result = self._run_interface(execute=True)
File "/usr/local/miniconda/lib/python3.7/site-packages/nipype/pipeline/engine/nodes.py", line 563, in _run_interface
return self._run_command(execute)
File "/usr/local/miniconda/lib/python3.7/site-packages/nipype/pipeline/engine/nodes.py", line 643, in _run_command
result = self._interface.run(cwd=outdir)
File "/usr/local/miniconda/lib/python3.7/site-packages/nipype/interfaces/base/core.py", line 375, in run
runtime = self._run_interface(runtime)
File "/usr/local/miniconda/lib/python3.7/site-packages/nipype/interfaces/utility/wrappers.py", line 144, in _run_interface
out = function_handle(**args)
File "<string>", line 39, in compare_xforms
File "/usr/local/miniconda/lib/python3.7/site-packages/nipype/algorithms/rapidart.py", line 131, in _calc_norm_affine
newpos[i, :] = np.dot(affine, all_pts)[0:3, :].ravel()
ValueError: shapes (0,) and (4,6) not aligned: 0 (dim 0) != 4 (dim 0)
It is very strange because I had run fMRIprep with no errors previously on this same dataset, but now I am trying to rerun it on the two additional subjects I have since gotten, but this error has now occured. Any help would be appreciated