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
625 stars 290 forks source link

fMRIPrep v20.2.5 docker error cannot find .../mri/orig/T2raw.mgz #2722

Open bh-lyu opened 2 years ago

bh-lyu commented 2 years ago

What happened?

I am running a large 100 subjects data set and found a few subjects failed and reporting the error. I reran one the of the failed subjects ('sub-CCNP020') and reported the same error in the log shown below.

It seems the report was related to the T2raw.mgz. But I checked the original T2 image and the image was normal as other successful subjects.

What command did you use?

# the $wd is my current working directory
bidsDir=$wd/BIDS
outDir=$wd/fmriprep
export FS_LICENSE=$wd/fs_license.txt
nthread=24
mem=48 

docker run -it --rm \
        -v $wd:/wd \
        -v $bidsDir:/data:ro \
        -v $outDir:/out \
        -u $(id -u ${USER}):$(id -g ${USER}) \
        nipreps/fmriprep:20.2.5 \
        /data /out \
        participant --participant-label  CCNP020  \
        -w temp/ \
        --nthreads $nthread \
        --mem_mb $mem \
        --use-aroma \
        --use-syn-sdc \
        --cifti-output \
        --output-spaces  MNIPediatricAsym:res-2:cohort-1 fsaverage:den-40k \
        --ignore slicetiming \
        --bids-filter-file /wd/bids-filter-ses1.json \
        --fs-subjects-dir /out/freesurfer-ses1 \
        --fs-license-file /wd/fs_license.txt \
        --skip_bids_validation

You are using fMRIPrep-20.2.5, and a newer version of fMRIPrep is available: 21.0.1.
Please check out our documentation about how and when to upgrade:
https://fmriprep.readthedocs.io/en/latest/faq.html#upgrading
220223-06:51:18,905 nipype.workflow WARNING:
     Previous output generated by version 0+unknown found.
220223-06:51:20,765 nipype.workflow IMPORTANT:

    Running fMRIPREP version 20.2.5:
      * BIDS dataset path: /data.
      * Participant list: ['CCNP020'].
      * Run identifier: 20220223-065056_7fc2a363-bf1e-4e1a-915a-ab8a7764a508.
      * Output spaces: MNIPediatricAsym:cohort-1:res-2 fsaverage:den-40k.
      * Pre-run FreeSurfer's SUBJECTS_DIR: /out/freesurfer-ses1.

What version of fMRIPrep are you running?

20.2.5

How are you running fMRIPrep?

Docker

Is your data BIDS valid?

Yes

Are you reusing any previously computed results?

FreeSurfer

Please copy and paste any relevant log output.

Traceback (most recent call last):
  File "/usr/local/miniconda/lib/python3.7/site-packages/nipype/pipeline/plugins/multiproc.py", line 67, in run_node
    result["result"] = node.run(updatehash=updatehash)
  File "/usr/local/miniconda/lib/python3.7/site-packages/nipype/pipeline/engine/nodes.py", line 516, in run
    result = self._run_interface(execute=True)
  File "/usr/local/miniconda/lib/python3.7/site-packages/nipype/pipeline/engine/nodes.py", line 635, in _run_interface
    return self._run_command(execute)
  File "/usr/local/miniconda/lib/python3.7/site-packages/nipype/pipeline/engine/nodes.py", line 741, in _run_command
    result = self._interface.run(cwd=outdir)
  File "/usr/local/miniconda/lib/python3.7/site-packages/nipype/interfaces/base/core.py", line 428, in run
    runtime = self._run_interface(runtime)
  File "/usr/local/miniconda/lib/python3.7/site-packages/nipype/interfaces/base/core.py", line 822, in _run_interface
    self.raise_exception(runtime)
  File "/usr/local/miniconda/lib/python3.7/site-packages/nipype/interfaces/base/core.py", line 753, in raise_exception
    ).format(**runtime.dictcopy())
RuntimeError: Command:
recon-all -parallel -subjid sub-CCNP020 -sd /out/freesurfer-ses1 -T2pial -cortribbon
Standard output:
INFO: FreeSurfer build stamps do not match
Subject Stamp: freesurfer-Linux-centos6_x86_64-stable-pub-v6.0.0-2beb96c
Current Stamp: freesurfer-Linux-centos6_x86_64-stable-pub-v6.0.1-f53a55a
INFO: SUBJECTS_DIR is /out/freesurfer-ses1
Actual FREESURFER_HOME /opt/freesurfer
-rw-rw-r-- 1 1021 1021 385518 Feb 22 10:42 /out/freesurfer-ses1/sub-CCNP020/scripts/recon-all.log
Linux bad7830ee00e 3.10.0-1160.45.1.el7.x86_64 #1 SMP Wed Oct 13 17:20:51 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux
'/opt/freesurfer/bin/recon-all' -> '/out/freesurfer-ses1/sub-CCNP020/scripts/recon-all.local-copy'
#--------------------------------------------
#@# Refine Pial Surfs w/ T2/FLAIR Tue Feb 22 13:03:15 UTC 2022

 bbregister --s sub-CCNP020 --mov /out/freesurfer-ses1/sub-CCNP020/mri/orig/T2raw.mgz --lta /out/freesurfer-ses1/sub-CCNP020/mri/transforms/T2raw.auto.lta --init-coreg --T2 

ERROR: cannot find /out/freesurfer-ses1/sub-CCNP020/mri/orig/T2raw.mgz
Linux bad7830ee00e 3.10.0-1160.45.1.el7.x86_64 #1 SMP Wed Oct 13 17:20:51 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux

recon-all -s sub-CCNP020 exited with ERRORS at Tue Feb 22 13:03:15 UTC 2022

For more details, see the log file /out/freesurfer-ses1/sub-CCNP020/scripts/recon-all.log
To report a problem, see http://surfer.nmr.mgh.harvard.edu/fswiki/BugReporting

Standard error:

Return code: 1

Additional information / screenshots

No response

effigies commented 2 years ago

When you created the FreeSurfer directories, did you pass -T2 /path/to/T2w.nii.gz? It seems that that step is missing.

You should be able to correct with:

recon-all -s sub-CCNP020 -T2 $bidsDir/sub-CCNP020/*/anat/sub-CCNP020_*T2w.nii.gz