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

fMRIprep 21.0.0 doesn't ignore fieldmaps intended for dwi #2696

Closed mblesac closed 1 year ago

mblesac commented 2 years ago

What happened?

fMRIprep doesn't work if in the fmap folder there are files intended for the dwi processing (unless the --ignore=fieldmaps is specified)

What command did you use?

singularity run -C -B /EBC:/EBC,$2:/opt/templateflow /EBC/home/mblesa/fmriprep_21.0.0.simg $2/BIDs_data $2/derivatives participant --participant-label ${NAME} -w $2/${NAME}_working_directory --nthreads 16 --omp-nthreads 16 --fs-license-file /EBC/local/infantFS/freesurfer/license.txt --output-space MNI152NLin2009cAsym:res-2 --stop-on-first-crash --skip_bids_validation

What version of fMRIPrep are you running?

21.0.0

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.

/opt/conda/lib/python3.8/site-packages/bids/config.py:39: FutureWarning: Setting 'extension_initial_dot' will be removed in pybids 0.16.
  warnings.warn("Setting 'extension_initial_dot' will be removed in pybids 0.16.",
220121-18:20:33,737 nipype.workflow IMPORTANT:
         Running fMRIPrep version 21.0.0

         License NOTICE ##################################################
         fMRIPrep 21.0.0
         Copyright 2021 The NiPreps Developers.

         This product includes software developed by
         the NiPreps Community (https://nipreps.org/).

         Portions of this software were developed at the Department of
         Psychology at Stanford University, Stanford, CA, US.

         This software redistributes the versioneer Python package, which is
         Public domain source code.

         This software is also distributed as a Docker container image.
         The bootstraping file for the image ("Dockerfile") is licensed
         under the MIT License.

         This software may be distributed through an add-on package called
         "Docker Wrapper" that is under the BSD 3-clause License.
         #################################################################
220121-18:20:33,846 nipype.workflow IMPORTANT:
         Building fMRIPrep's workflow:
           * BIDS dataset path: /EBC/home/mblesa/study_5y/PRUEBA/CONVERSION/BIDs_data.
           * Participant list: ['007'].
           * Run identifier: 20220121-182022_55f8045e-4b1f-4b24-98f2-bbfcf8947ec0.
           * Output spaces: MNI152NLin2009cAsym:res-2.
           * Pre-run FreeSurfer's SUBJECTS_DIR: /EBC/home/mblesa/study_5y/PRUEBA/CONVERSION/derivatives/sourcedata/freesurfer.
Process Process-2:
Traceback (most recent call last):
  File "/opt/conda/lib/python3.8/multiprocessing/process.py", line 315, in _bootstrap
    self.run()
  File "/opt/conda/lib/python3.8/multiprocessing/process.py", line 108, in run
    self._target(*self._args, **self._kwargs)
  File "/opt/conda/lib/python3.8/site-packages/fmriprep/cli/workflow.py", line 118, in build_workflow
    retval["workflow"] = init_fmriprep_wf()
  File "/opt/conda/lib/python3.8/site-packages/fmriprep/workflows/base.py", line 85, in init_fmriprep_wf
    single_subject_wf = init_single_subject_wf(subject_id)
  File "/opt/conda/lib/python3.8/site-packages/fmriprep/workflows/base.py", line 324, in init_single_subject_wf
    fmap_estimators = find_estimators(
  File "/opt/conda/lib/python3.8/site-packages/sdcflows/utils/wrangler.py", line 324, in find_estimators
    fm.FieldmapFile(fmap.path, metadata=fmap.get_metadata())
AttributeError: 'NoneType' object has no attribute 'path'
(pam_mount.c:133): clean system authtok=0x559a3239ace0 (1073741824)

Additional information / screenshots

No response

effigies commented 2 years ago

I think this case should be fixed in the next release, planned for next week. I'll leave this open in case not.

effigies commented 2 years ago

21.0.1 is released. Please let us know if this is not resolved.

chrisvriend commented 2 years ago

dear all, I'm having a similar issue in 21.0.1. the fmap scans intended for the dwi scan are used in fmriprep for the fieldmap estimation and the susceptibility induced distortion correction but actually make the distortion worse than they were before the 'correction'. Removing the dwi fmap scans resolves the issue and ensures that only the fmap for the functional scan are used (--ignore=fieldmaps is therefore not an option)

effigies commented 1 year ago

Well, this got buried. @chrisvriend have you tried in 22.0.2? If this is not resolved, could you open a new issue, filling out the whole template?