Hello, we implemented an automated processing via fMRIPrep. Essentially, a specially named series acquired at the end of the protocol triggers a script on the DICOM server that starts BIDS import and fMRIPrep, using per-study configuration files.
Everithing works pretty well, until a second session is added for the same subject.
In this case, the first session had run as the only session of the subject, while the second one finds a session already processed.
The first question is: should I delete the derivatives of the first session before running again the subject after the second session has been acquired, or the pipeline has a built-in mechanism for this case? If not, I suppose I have to delete the fressuerfer derivatives, too?
Does it apply irrespective of the —longitudinal switch?
In both cases (i.e. whether I delete the first session derivatives or not) fMRIPrep currently stops with the error:
NotImplementedError: Sophisticated PEPOLAR schemes are unsupported
Indeed, the pipeline tries to setup the fieldmap estimation with:
Setting-up fieldmap "fmapFMRI" (EstimatorType.PEPOLAR) with <sub-00206465_ses-20210722_acq-SpinEchoFieldMapFMRI_dir-AP_epi.nii.gz, sub-00206465_ses-20210722_acq-SpinEchoFieldMapFMRI_dir-PA_epi.nii.gz, sub-00206465_ses-20211109_acq-SpinEchoFieldMapFMRI_dir-AP_epi.nii.gz, sub-00206465_ses-20211109_acq-SpinEchoFieldMapFMRI_dir-PA_epi.nii.gz>
that is, it is trying to merge the fieldmaps acquired in both sessions. I think it is a wrong behaviour, the field is certainly not the same across session.
jsons are crafted as follows
e.g., for session 20211109, for fieldmap data:
"IntendedFor": [
"ses-20211109/func/sub-00206465_ses-20211109_task-rest_run-1_echo-1_bold.nii.gz",
"ses-20211109/func/sub-00206465_ses-20211109_task-rest_run-1_echo-1_sbref.nii.gz",
"ses-20211109/func/sub-00206465_ses-20211109_task-rest_run-1_echo-2_bold.nii.gz",
"ses-20211109/func/sub-00206465_ses-20211109_task-rest_run-1_echo-2_sbref.nii.gz",
"ses-20211109/func/sub-00206465_ses-20211109_task-rest_run-1_echo-3_bold.nii.gz",
"ses-20211109/func/sub-00206465_ses-20211109_task-rest_run-1_echo-3_sbref.nii.gz"
],
"B0FieldIdentifier": "fmapFMRI"
and for BOLD data:
"B0FieldSource": "fmapFMRI"
Do I have to specify a distinct B0FieldSource/B0FieldIdentifier between sessions? In any case, the pipeline should not attempt to mix fieldmaps from diffferent sessions…
Am I supposed to manage the issue with --bids-filter-file?
Best ragrds, Federico
Command used (and if a helper script was used, a link to the helper script or the command generated):
/opt/pip-safe/fmriprep-docker/bin/fmriprep-docker /opt/paminaprocessing/Prisma/BIDS/XXX/YY /opt/paminaprocessing/Prisma/BIDS/XXX/YY/derivatives participant --participant-label 00206465 --work-dir /tmp/tpa0bd5dfd_ab2a_4307_8685_48ed1526c82e --nprocs 16 --fs-license-file /opt/fmriprep/freesurfer_license.txt --md-only-boilerplate --write-graph --image nipreps/fmriprep:23.2.1 --output-spaces MNI152NLin2009cAsym:res-native func --me-output-echos --clean-workdir > /opt/paminaprocessing/Prisma/BIDS/XXX/YY/tmp_fmripreprunlogs/2024-03-15-19-07_shell.log 2>&1
Version:
23.2.1
Environment (Docker, Singularity / Apptainer, custom installation):
Docker