Summary of what happened:
I’m very new to the fmri field, sorry in advance if I’ve done some silly mistakes.
I’m running fmriprep on a single stroke patient with one session that includes FLAIR, T2w, and T1w scans, three functional tasks, and fieldmaps (magnitude1, magnitude2, phasediff). The preprocessing runs without errors, but I suspect that the lesion mask I provide is not being used. The mask is:
- in the subject’s anat/ folder
- binary and in the same space and orientation as the T1w image
- named with the _roi suffix
- listed in .bidsignore
- validated successfully by the bids validator
However, the following citation line in the citation.html file does not appear: “with cost function masking with the lesion mask to minimize warping of healthy tissue into damaged areas (Brett et al., 2001).”
Likewise, the subject HTML report does not mention the lesion mask, and a downstream pipeline (fmristroke) that depends on fmriprep derivatives from versions <23.2 is reporting missing components.
I’ve tried several variations, running without session folders, adding a JSON sidecar for the lesion mask, forcing BBR and skull stripping, but the outcome hasn’t changed. I’ve included below the fmriprep outputs and a screenshot of my folder organization.
Am I right to think that the lesion mask is not used? If so, what should I check next to ensure that fmriprep correctly recognizes and applies the lesion mask during normalization?
Command used (and if a helper script was used, a link to the helper script or the command generated):
runai submit --name fmriprep-test23-0-2 ...<runai commands>... -i .../fmriprep:23.0.2 -- /data/data/RevS /data/data/RevS/derivatives/fmriprep_v23_0_2 participant --fs-license-file /data/data/license_freesurfer.txt --work-dir data/data/RevS_work --verbose --output-layout bids --write-graph --return-all-components
Version:
fmriprep v23.0.2
Environment (Docker, Singularity / Apptainer, custom installation):
Docker
Data formatted according to a validatable standard? Please provide the output of the validator:
fmriprep validator only warned about authors list and readme being small.
Relevant log outputs (up to 20 lines):
fmristroke output:
251007-08:54:53,438 nipype.workflow WARNING:
A ttempted to access pre-existing bold derivatives at </data/data/RevS/derivatives/fmriprep_v23_0_2_no_ses>, however not all expectations of fMRIPrep were met (for participant <RevS01>.
251007-08:54:53,438 nipype.workflow WARNING:
A ttempted to access pre-existing bold derivatives at </data/data/RevS/derivatives/fmriprep_v23_0_2_no_ses>, however not all expectations of fMRIPrep were met (for participant <RevS01>.
3 times the same error in nipype (used by fmristroke), which I suspect is caused by missing files
Traceback:
Traceback (most recent call last):
File "/usr/local/lib/python3.10/dist-packages/nipype/interfaces/base/core.py", line 397, in run
runtime = self._run_interface(runtime)
File "/usr/local/lib/python3.10/dist-packages/nipype/interfaces/utility/wrappers.py", line 142, in _run_interface
out = function_handle(**args)
TypeError: _group_outputs() missing 1 required positional argument: 'in_outputs'
Screenshots / relevant information:
Folder architecture:
Output of fmriprep:
sub-RevS01_ses-T1_acq-mprage_desc-aparcaseg_dseg.nii.gz sub-RevS01_ses-T1_acq-mprage_hemi-L_thickness.shape.gii
sub-RevS01_ses-T1_acq-mprage_desc-aseg_dseg.nii.gz sub-RevS01_ses-T1_acq-mprage_hemi-R_curv.shape.gii
sub-RevS01_ses-T1_acq-mprage_desc-brain_mask.json sub-RevS01_ses-T1_acq-mprage_hemi-R_inflated.surf.gii
sub-RevS01_ses-T1_acq-mprage_desc-brain_mask.nii.gz sub-RevS01_ses-T1_acq-mprage_hemi-R_midthickness.surf.gii
sub-RevS01_ses-T1_acq-mprage_desc-preproc_T1w.json sub-RevS01_ses-T1_acq-mprage_hemi-R_pial.surf.gii
sub-RevS01_ses-T1_acq-mprage_desc-preproc_T1w.nii.gz sub-RevS01_ses-T1_acq-mprage_hemi-R_smoothwm.surf.gii
sub-RevS01_ses-T1_acq-mprage_desc-preproc_T2w.json sub-RevS01_ses-T1_acq-mprage_hemi-R_sulc.shape.gii
sub-RevS01_ses-T1_acq-mprage_desc-preproc_T2w.nii.gz sub-RevS01_ses-T1_acq-mprage_hemi-R_thickness.shape.gii
sub-RevS01_ses-T1_acq-mprage_desc-ribbon_mask.nii.gz sub-RevS01_ses-T1_acq-mprage_label-CSF_probseg.nii.gz
sub-RevS01_ses-T1_acq-mprage_dseg.nii.gz sub-RevS01_ses-T1_acq-mprage_label-GM_probseg.nii.gz
sub-RevS01_ses-T1_acq-mprage_from-fsnative_to-T1w_mode-image_xfm.txt sub-RevS01_ses-T1_acq-mprage_label-WM_probseg.nii.gz
sub-RevS01_ses-T1_acq-mprage_from-MNI152NLin2009cAsym_to-T1w_mode-image_xfm.h5 sub-RevS01_ses-T1_acq-mprage_space-MNI152NLin2009cAsym_desc-brain_mask.json
sub-RevS01_ses-T1_acq-mprage_from-T1w_to-fsnative_mode-image_xfm.txt sub-RevS01_ses-T1_acq-mprage_space-MNI152NLin2009cAsym_desc-brain_mask.nii.gz
sub-RevS01_ses-T1_acq-mprage_from-T1w_to-MNI152NLin2009cAsym_mode-image_xfm.h5 sub-RevS01_ses-T1_acq-mprage_space-MNI152NLin2009cAsym_desc-preproc_T1w.json
sub-RevS01_ses-T1_acq-mprage_hemi-L_curv.shape.gii sub-RevS01_ses-T1_acq-mprage_space-MNI152NLin2009cAsym_desc-preproc_T1w.nii.gz
sub-RevS01_ses-T1_acq-mprage_hemi-L_inflated.surf.gii sub-RevS01_ses-T1_acq-mprage_space-MNI152NLin2009cAsym_dseg.nii.gz
sub-RevS01_ses-T1_acq-mprage_hemi-L_midthickness.surf.gii sub-RevS01_ses-T1_acq-mprage_space-MNI152NLin2009cAsym_label-CSF_probseg.nii.gz
sub-RevS01_ses-T1_acq-mprage_hemi-L_pial.surf.gii sub-RevS01_ses-T1_acq-mprage_space-MNI152NLin2009cAsym_label-GM_probseg.nii.gz
sub-RevS01_ses-T1_acq-mprage_hemi-L_smoothwm.surf.gii sub-RevS01_ses-T1_acq-mprage_space-MNI152NLin2009cAsym_label-WM_probseg.nii.gz
sub-RevS01_ses-T1_acq-mprage_hemi-L_sulc.shape.gii
./fmap:
sub-RevS01_ses-T1_fmapid-auto00000_desc-coeff0_fieldmap.nii.gz sub-RevS01_ses-T1_fmapid-auto00000_desc-preproc_fieldmap.json
sub-RevS01_ses-T1_fmapid-auto00000_desc-coeff1_fieldmap.nii.gz sub-RevS01_ses-T1_fmapid-auto00000_desc-preproc_fieldmap.nii.gz
sub-RevS01_ses-T1_fmapid-auto00000_desc-magnitude_fieldmap.nii.gz
./func:
sub-RevS01_ses-T1_task-motor_boldref.nii.gz
sub-RevS01_ses-T1_task-motor_desc-confounds_timeseries.json
sub-RevS01_ses-T1_task-motor_desc-confounds_timeseries.tsv
sub-RevS01_ses-T1_task-motor_from-scanner_to-boldref_mode-image_xfm.txt
sub-RevS01_ses-T1_task-motor_from-scanner_to-T1w_mode-image_xfm.txt
sub-RevS01_ses-T1_task-motor_from-T1w_to-scanner_mode-image_xfm.txt
sub-RevS01_ses-T1_task-motor_space-MNI152NLin2009cAsym_boldref.nii.gz
sub-RevS01_ses-T1_task-motor_space-MNI152NLin2009cAsym_desc-aparcaseg_dseg.nii.gz
sub-RevS01_ses-T1_task-motor_space-MNI152NLin2009cAsym_desc-aseg_dseg.nii.gz
sub-RevS01_ses-T1_task-motor_space-MNI152NLin2009cAsym_desc-brain_mask.json
sub-RevS01_ses-T1_task-motor_space-MNI152NLin2009cAsym_desc-brain_mask.nii.gz
sub-RevS01_ses-T1_task-motor_space-MNI152NLin2009cAsym_desc-preproc_bold.json
sub-RevS01_ses-T1_task-motor_space-MNI152NLin2009cAsym_desc-preproc_bold.nii.gz
sub-RevS01_ses-T1_task-rest_boldref.nii.gz
sub-RevS01_ses-T1_task-rest_desc-confounds_timeseries.json
sub-RevS01_ses-T1_task-rest_desc-confounds_timeseries.tsv
sub-RevS01_ses-T1_task-rest_from-scanner_to-boldref_mode-image_xfm.txt
sub-RevS01_ses-T1_task-rest_from-scanner_to-T1w_mode-image_xfm.txt
sub-RevS01_ses-T1_task-rest_from-T1w_to-scanner_mode-image_xfm.txt
sub-RevS01_ses-T1_task-rest_space-MNI152NLin2009cAsym_boldref.nii.gz
sub-RevS01_ses-T1_task-rest_space-MNI152NLin2009cAsym_desc-aparcaseg_dseg.nii.gz
sub-RevS01_ses-T1_task-rest_space-MNI152NLin2009cAsym_desc-aseg_dseg.nii.gz
sub-RevS01_ses-T1_task-rest_space-MNI152NLin2009cAsym_desc-brain_mask.json
sub-RevS01_ses-T1_task-rest_space-MNI152NLin2009cAsym_desc-brain_mask.nii.gz
sub-RevS01_ses-T1_task-rest_space-MNI152NLin2009cAsym_desc-preproc_bold.json
sub-RevS01_ses-T1_task-rest_space-MNI152NLin2009cAsym_desc-preproc_bold.nii.gz
sub-RevS01_ses-T1_task-visual_boldref.nii.gz
sub-RevS01_ses-T1_task-visual_desc-confounds_timeseries.json
sub-RevS01_ses-T1_task-visual_desc-confounds_timeseries.tsv
sub-RevS01_ses-T1_task-visual_from-scanner_to-boldref_mode-image_xfm.txt
sub-RevS01_ses-T1_task-visual_from-scanner_to-T1w_mode-image_xfm.txt
sub-RevS01_ses-T1_task-visual_from-T1w_to-scanner_mode-image_xfm.txt
sub-RevS01_ses-T1_task-visual_space-MNI152NLin2009cAsym_boldref.nii.gz
sub-RevS01_ses-T1_task-visual_space-MNI152NLin2009cAsym_desc-aparcaseg_dseg.nii.gz
sub-RevS01_ses-T1_task-visual_space-MNI152NLin2009cAsym_desc-aseg_dseg.nii.gz
sub-RevS01_ses-T1_task-visual_space-MNI152NLin2009cAsym_desc-brain_mask.json
sub-RevS01_ses-T1_task-visual_space-MNI152NLin2009cAsym_desc-brain_mask.nii.gz
sub-RevS01_ses-T1_task-visual_space-MNI152NLin2009cAsym_desc-preproc_bold.json
sub-RevS01_ses-T1_task-visual_space-MNI152NLin2009cAsym_desc-preproc_bold.nii.gz
If you need more information, I will gladly provide some more.
Thank you for your time,
Antonin HUDRY