nipreps / fmriprep

fMRIPrep is a robust and easy-to-use pipeline for preprocessing of diverse fMRI data. The transparent workflow dispenses of manual intervention, thereby ensuring the reproducibility of the results.
https://fmriprep.org
Apache License 2.0
637 stars 294 forks source link

mritotal: Command not found. #3088

Closed E-Loba closed 1 year ago

E-Loba commented 1 year ago

What happened?

"command not found" error encountered when processing 1 subject's data with latest (up to date) image of fmriPrep. This leads me to believe it's an issue with the docker image, rather than freesurfer.

mritotal -verbose -debug -clobber -modeldir /opt/freesurfer/mni/bin/../share/mni_autoreg -protocol icbm transforms/tmp.talairach.181794/src.mnc transforms/talairach.auto.xfm mritotal: Command not found. ERROR: mritotal failed, see transforms/talairach.log

the file "transforms/talairach.log" shows no error!!! (additional file content pasted below)

full command line error output: fmriprep bug report.txt

upon manual inspection of scans in FSL eyes, no misalignment/anomalies between anatomical and BOLD data were found

What command did you use?

docker run --rm -it -v /path1/:/fslic/ -v /path2/:/myserver/ --env-file /path1/docker_licvar.txt --user "$(id -u)" nipreps/fmriprep:latest /myserver/BIDS/raw /myserver/BIDS/derivatives participant --participant_label 20 --skip_bids_validation --clean-workdir --ignore slicetiming --output-spaces MNI152NLin2009cAsym:res-2 anat --work-dir fmpriprep_w_20/ --nprocs 20

What version of fMRIPrep are you running?

23.1.4

How are you running fMRIPrep?

Docker

Is your data BIDS valid?

Yes

Are you reusing any previously computed results?

No

Please copy and paste any relevant log output.

transforms/talairach.log

/myserver/BIDS/derivatives/sourcedata/freesurfer/sub-20/mri
/opt/freesurfer/bin/talairach
--i orig_nu.mgz --xfm transforms/talairach.auto.xfm
talairach 7.3.2
Linux fc28766fcf58 3.10.0-1160.25.1.el7.x86_64 #1 SMP Wed Apr 28 21:49:45 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux
Fri Sep 15 02:38:19 UTC 2023
tmpdir is transforms/tmp.talairach.181794
/myserver/BIDS/derivatives/sourcedata/freesurfer/sub-20/mri
mri_convert orig_nu.mgz transforms/tmp.talairach.181794/src.mnc
mri_convert orig_nu.mgz transforms/tmp.talairach.181794/src.mnc 
reading from orig_nu.mgz...
TR=0.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)
writing to transforms/tmp.talairach.181794/src.mnc...

Additional information / screenshots

No response

effigies commented 1 year ago

Yup, the issue will be in our exclusion file:

https://github.com/nipreps/fmriprep/blob/master/docker/files/freesurfer7.3.2-exclude.txt

We use it in the Dockerfile to filter out much of the FreeSurfer distribution:

https://github.com/nipreps/fmriprep/blob/20659650be367dff78f5e8c91c1856d4df7fcd4b/Dockerfile#L55-L59

Would you be up for building and testing a fix? The approach would be to fork off of the maint/23.1.x branch, make your changes, build a docker image and then run again. We'll want to make sure that mritotal doesn't depend on something else that we're excluding.

E-Loba commented 1 year ago

sorry for the late reply. We had a long weekend :)

it worked perfectly after including the following directories: /freesurfer/mni/bin/mritotal /freesurfer/mni/etc/mni_autoreg /freesurfer/mni/share/mni_autoreg

I forked my branch here: https://github.com/E-Loba/fmriprep_withMriTotal.git

should I submit a merge request, or is it OK to leave it as a side branch?

effigies commented 1 year ago

Please do open a PR. If you ran into this, others will as well.

tsalo commented 1 year ago

I'm not sure #3090 included everything mritotal needs. I was running the unstable version of fMRIPrep (from 2023/10/04) on some data and got the following error:

mritotal: couldn't find program "mincresample"
mritotal: couldn't find program "mincblur"
mritotal: couldn't find program "volume_cog"
mritotal: couldn't find program "minctracc"
mritotal: couldn't find program "check_scale"
mritotal: couldn't find program "autocrop"

EDIT: I've opened #3103.