Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

SDC fieldmap-less error #2878

Open
QDevignes opened this issue Oct 12, 2022 · 7 comments
Open

SDC fieldmap-less error #2878

QDevignes opened this issue Oct 12, 2022 · 7 comments

Comments

@QDevignes
Copy link

What happened?

Good morning,
We have recently updated the version of fMRIPrep we are using. Although fMRIPrep finished successfully for some participants, we got several errors for several participants. It looks like the issue is related to the SDC step. Indeed, if we launch fMRIPrep without syn-sdc, the pipeline finishes successfully. However, we don't understand why we got errors for some participants while it ran successfully for some other participants. We precise that there is no difference when we compare the data between a participant who ran successfully and one who finished with errors.
We should precise that when we use another SDC approach (like PEPOLAR), the process finishes successfully. However, we cannot use the PEPOLAR approach for all our participants because we don't have 2 fMRI runs for all participants. In addition, we cannot use a direct field mapping because the magnitude files were not saved when the data were acquired. Therefore, to be consistent, we don't have the choice and need to use the syn-sdc approach.

What command did you use?

/opt/conda/bin/fmriprep /data/rossolab/Spared/Imaging_Data/NIFTI /data/rossolab/Spared/Imaging_Data/derivatives/fmriprep_relaunched participant --fs-license-file /cm/shared/freesurfer-6.0.1/license.txt --participant_label sub-PAC103 --output-spaces MNI152NLin6Asym:res-2 anat fsaverage --n_cpus 4 --mem-mb 16384 --notrack --use-aroma --use-syn-sdc -vv -w /data/rossolab/Spared/Imaging_Data/derivatives/fmriprep_relaunched/workdir

What version of fMRIPrep are you running?

22.0.2

How are you running fMRIPrep?

Singularity

Is your data BIDS valid?

Yes

Are you reusing any previously computed results?

No

Please copy and paste any relevant log output.

Stderr:
	Exception Object caught: 

	itk::ExceptionObject (0x2fdc8d0)
	Location: "unknown" 
	File: /src/ants/build/staging/include/ITK-5.1/itkImageMomentsCalculator.hxx
	Line: 148
	Description: itk::ERROR: ImageMomentsCalculator(0x2fd1910): Compute(): Total Mass of the image was zero. Aborting here to prevent division by zero later on.


Traceback:
	Traceback (most recent call last):
	  File "/opt/conda/lib/python3.9/site-packages/nibabel/loadsave.py", line 90, in load
	    stat_result = os.stat(filename)
	FileNotFoundError: [Errno 2] No such file or directory: '/data/rossolab/Spared/Imaging_Data/derivatives/fmriprep_relaunched/workdir/fmriprep_22_0_wf/single_subject_PAC103_wf/func_preproc_task_rest_run_1_wf/coeff2epi_wf/coregister/transform_Warped.nii.gz'

	During handling of the above exception, another exception occurred:

	Traceback (most recent call last):
	  File "/opt/conda/lib/python3.9/site-packages/nipype/interfaces/base/core.py", line 398, in run
	    runtime = self._run_interface(runtime)
	  File "/opt/conda/lib/python3.9/site-packages/niworkflows/interfaces/fixes.py", line 110, in _run_interface
	    _copyxform(
	  File "/opt/conda/lib/python3.9/site-packages/niworkflows/utils/images.py", line 79, in _copyxform
	    resampled = nb.load(out_image, mmap=False)
	  File "/opt/conda/lib/python3.9/site-packages/nibabel/loadsave.py", line 92, in load
	    raise FileNotFoundError(f"No such file or no access: '{filename}'")
	FileNotFoundError: No such file or no access: '/data/rossolab/Spared/Imaging_Data/derivatives/fmriprep_relaunched/workdir/fmriprep_22_0_wf/single_subject_PAC103_wf/func_preproc_task_rest_run_1_wf/coeff2epi_wf/coregister/transform_Warped.nii.gz'


221005-20:12:38,880 cli ERROR:
	 Preprocessing did not finish successfully. Errors occurred while processing data from participants: PAC103 (1). Check the HTML reports for details.
221005-20:12:38,880 cli ERROR:
	 Preprocessing did not finish successfully. Errors occurred while processing data from participants: PAC103 (1). Check the HTML reports for details.

Additional information / screenshots

You can find the HTML report here: https://www.dropbox.com/s/ij8ljvnpzbf9lro/sub-PAC103.html?dl=0

@effigies
Copy link
Member

How many BOLD runs are you using, and could you provide the affines (fslhd <image> | grep sform)? This may be an issue where the estimated fieldmaps are too far out of alignment with the BOLD series.

@QDevignes
Copy link
Author

Thank you for your reply!

We are using one BOLD run. The result of fslhd | grep sform is:
sform_name Scanner Anat
sform_code 1
sform_xorient Right-to-Left
sform_yorient Posterior-to-Anterior
sform_zorient Inferior-to-Superior

@effigies
Copy link
Member

I'm seeing this same issue on a dataset I'm working with. Thanks for your patience while I track this down.

@QDevignes
Copy link
Author

Good morning,

Thanks for taking some time to troubleshoot this error. I don't know if they will be helpful, but here are some new info:

  • Out of 25 subjects, 18 had either a co-registration error or an SDC that looks awful
  • I relaunched fMRIPrep for these 18 subjects without changing anything in the command
  • Out of these 18 subjects, 5 finished without any error and the SDC looks good
  • For the 13 remaining subjects, some have still the same error as previously, but some have another error (i.e., some subjects with a co-registration error have now an awful SDC, and some with an awful SDC have now a co-registration error)

Therefore, it seems that relaunching the fMRIPrep command may help for some subjects. However, most subjects still have an error...

If I can be of any help to troubleshoot these errors, feel free to ask.

Best,
Quentin

@QDevignes
Copy link
Author

Good morning,

I would like to know your opinion on the use of two different SDC approaches in the same population. Indeed, for 88% of our subjects, we have two fMRI runs with opposite PE directions. Therefore, we could use the PePOLAR approach for these subjects. However, for the remaining 22%, our only option is the syn-sdc approach (and so, we need to wait for the error above to be resolved). Do you think it would be better to use the same approach (syn-sdc) on all our subjects for the sake of consistency or could we use two different approaches in the same study?

Best,
Quentin

@effigies
Copy link
Member

effigies commented Nov 7, 2022

Hi @QDevignes, apologies for the slow response. My inclination would be to try to keep processing as consistent as possible, but it may be worth taking a couple subjects and comparing the results of SyN and PEPOLAR and see if you get significantly better results. There's an argument to be made for "consistently using the best available processing", as well.

@QDevignes
Copy link
Author

Hi @effigies, thanks for your reply. We decided to use the same SDC approach (syn-sdc) for all our participants. Therefore, we are using fMRIPrep version 20.2.7 to avoid the syn-sdc error reported above.

# for free to join this conversation on GitHub. Already have an account? # to comment
Projects
None yet
Development

No branches or pull requests

2 participants