Fmriprep-docker: Talairaching fails, 3T18yoSchwartzReactN32_as_orig.4dfp.img does not exist!

Hello Everyone,

running fmriprep-docker on a few participants that have no functional data, just anatomical data.

Here’s my command:

fmriprep-docker BIDS derivatives participant --fs-license-file freesurfer_license.txt --low-mem --output-spaces T1w --anat-only

For 5 out of 8 participants, the following happens:

ERROR: talairach_afd: Talairach Transform: transforms/talairach.xfm FAILED (p=0.0000, pval=0.0000 < threshold=0.0050)

Manual Talairach alignment may be necessary, or
include the -notal-check flag to skip this test,
making sure the -notal-check flag follows -all
or -autorecon1 in the command string.
See:

FsTutorial/Talairach - Free Surfer Wiki

INFO: Retrying Talairach align using 3T-based atlas…

#--------------------------------------------
#@# Talairach Thu Nov 10 03:51:21 UTC 2022
/out/sourcedata/freesurfer/sub-0003/mri

mri_nu_correct.mni --no-rescale --i orig.mgz --o orig_nu.mgz --ants-n4 --n 1 --proto-iters 1000 --distance 50

/usr/bin/bc
/out/sourcedata/freesurfer/sub-0003/mri
/opt/freesurfer/bin/mri_nu_correct.mni
–no-rescale --i orig.mgz --o orig_nu.mgz --ants-n4 --n 1 --proto-iters 1000 --distance 50
nIters 1
mri_nu_correct.mni 7.2.0
Linux 66e1fab3cfd2 5.10.47-linuxkit #1 SMP Sat Jul 3 21:51:47 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux
Thu Nov 10 03:51:21 UTC 2022
tmpdir is ./tmp.mri_nu_correct.mni.2390
cd /out/sourcedata/freesurfer/sub-0003/mri
AntsN4BiasFieldCorrectionFs -i orig.mgz -o ./tmp.mri_nu_correct.mni.2390/nu0.mgz --dtype uchar
AntsN4BiasFieldCorrectionFs done
mri_convert ./tmp.mri_nu_correct.mni.2390/nu0.mgz orig_nu.mgz --like orig.mgz --conform
mri_convert ./tmp.mri_nu_correct.mni.2390/nu0.mgz orig_nu.mgz --like orig.mgz --conform
reading from ./tmp.mri_nu_correct.mni.2390/nu0.mgz…
TR=1620.00, TE=0.00, TI=0.00, flip angle=0.00
i_ras = (-1, 0, 0)
j_ras = (0, 0, -1)
k_ras = (0, 1, 0)
INFO: transform src into the like-volume: orig.mgz
writing to orig_nu.mgz…

Thu Nov 10 03:54:25 UTC 2022
mri_nu_correct.mni done

talairach_avi --i orig_nu.mgz --xfm transforms/talairach.auto.xfm --atlas 3T18yoSchwartzReactN32_as_orig

talairach_avi log file is transforms/talairach_avi.log…
ERROR: mpr2mni305 failed, see transforms/talairach_avi.log
Linux 66e1fab3cfd2 5.10.47-linuxkit #1 SMP Sat Jul 3 21:51:47 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux

recon-all -s sub-0003 exited with ERRORS at Thu Nov 10 03:54:28 UTC 2022

and in transforms/talairach_avi.log we see this:

ERROR: /opt/freesurfer/average/3T18yoSchwartzReactN32_as_orig.4dfp.img does not exist!

So it seems that fmriprep-docker does not have access to that file, which is available in my local freesurfer installation, but the bigger issue is probably that the standard Talairaching fails.

I think this may be related to this topic and that I may just have to do manual Talairaching before passing my files to fmriprep, but not exactly sure how to do that and whether to change my fmriprep call after doing it.

I should mention that the data are quite poor quality, in my estimation, but the quality does not seem drastically worse between the participants that succeed and those that fail.

Loving fmriprep-docker.

Best,

Peter

Hi,

Have you considered running Freesurfer independently? Then you can have more control over these errors. When Freesurfer completes you can use the outputs in fMRIPrep, or if you are just working with T1 images, you can use sMRIPrep.

Best,
Steven

Hi Steven,

Thanks for your reply. Yes, I could do that. However, even though my use case is fairly minimal here, adopting an alternative workflow seems somewhat at odds with the reproducible computing goals of using fMRIPrep (and sMRIPrep) in the first place.

Question: Is sMRIPrep different from running fMRIprep with --anat-only?

Best,

Peter

I don’t think this is a big issue, the documentation for fMRIPrep expressly says that pre-existing FreeSurfer outputs can be reused.

In theory, no, but it is possible that the most recent sMRIPrep may be at a newer version than that which is bundled with fMRIPrep.

Best,
Steven

I guess my point was more that whenever I introduce “manual” steps in addition to just running fMRIprep, those steps are by definition not reproducible.

Hello,

I recently encountered the same error for a single participant, which I did not have when running my other participants. Did you by chance find a solution for this error?