fMRIPrep 25.0.0 failed to use fmaps in ds004630

Summary of what happened:

the dataset: OpenNeuro

In the first run, i ran fMRIprep on the dataset as it is. In this dataset the IntendedFor field was included in the *phasediff.json but not the *magnitude*.json.

this is how the IntendedFor field looks like for the phasediff.json:
"IntendedFor": [ "func/sub-03_task-passiveview_run-1_bold.nii", "func/sub-03_task-passiveview_run-2_bold.nii", "func/sub-03_task-passiveview_run-3_bold.nii", "func/sub-03_task-passiveview_run-4_bold.nii", "func/sub-03_task-passiveview_run-5_bold.nii", "func/sub-03_task-restpost_bold.nii", "func/sub-03_task-restpre_bold.nii" ],

fMRIprep completed without any errors, on all the subjects, however none of the subject had any fmap output files; the sub-*/fmap output directories were missing

Subsequently, i’ve added the IntendedFor fields into the *magnitude*.json files and ran fMRIprep on a single subject, but just like before the fmap files/directories were missing.

Command used (and if a helper script was used, a link to the helper script or the command generated):

fmriprep $subdir $output participant -w $work \
    --output-spaces MNI152NLin6Asym --cifti-output 91k \
    --participant-label sub-$d --nthreads 16 --omp-nthreads 16 --md-only-boilerplate

Version:

25.0.0

Environment (Docker, Singularity / Apptainer, custom installation):

Manual Prepared Environment (Miniconda3-py312_25.1.1-2)

Data formatted according to a validatable standard? Please provide the output of the validator:

output frombids-validator-deno:


 [WARNING] SIDECAR_KEY_RECOMMENDED A data file's JSON sidecar is missing a key listed as recommended.
  AcquisitionDuration
  /sub-11/func/sub-11_task-passiveview_run-1_bold.nii - Field description: Duration (in seconds) of volume acquisition.
Corresponds to DICOM Tag 0018, 9073 `Acquisition Duration`.
This field is mutually exclusive with `"RepetitionTime"`.

  /sub-11/func/sub-11_task-passiveview_run-3_bold.nii - Field description: Duration (in seconds) of volume acquisition.
Corresponds to DICOM Tag 0018, 9073 `Acquisition Duration`.
This field is mutually exclusive with `"RepetitionTime"`.


  336 more files with the same issue

 Please visit https://neurostars.org/search?q=SIDECAR_KEY_RECOMMENDED for existing conversations about this issue.

 [WARNING] TSV_ADDITIONAL_COLUMNS_UNDEFINED A TSV file has extra columns which are not defined in its associated JSON sidecar
  time from script start
  /sub-11/func/sub-11_task-passiveview_run-1_events.tsv
  /sub-11/func/sub-11_task-passiveview_run-3_events.tsv

  238 more files with the same issue

 Please visit https://neurostars.org/search?q=TSV_ADDITIONAL_COLUMNS_UNDEFINED for existing conversations about this issue.

 [WARNING] SUSPICIOUSLY_LONG_EVENT_DESIGN The onset of the last event is after the total duration of the corresponding scan.
This design is suspiciously long.

  /sub-20/func/sub-20_task-passiveview_run-3_bold.nii
  /sub-08/func/sub-08_task-passiveview_run-3_bold.nii

 Please visit https://neurostars.org/search?q=SUSPICIOUSLY_LONG_EVENT_DESIGN for existing conversations about this issue.


          Summary:                          Available Tasks:        Available Modalities:
          1312 Files, 137 GB                passiveview             MRI
          49 - Subjects 1 - Sessions        restpost
                                            restpre

 If you have any questions, please post on https://neurostars.org/tags/bids.

Relevant log outputs (up to 20 lines):

NA. no error reported.

Screenshots / relevant information:

An example of the fmap .json file
{ "Modality":"MR", "MagneticFieldStrength": 3, "ImagingFrequency": 123.254, "Manufacturer":"Siemens", "ManufacturersModelName":"Skyra", "InstitutionName":"Univie-Zahnklinik", "InstitutionalDepartmentName":"Department", "InstitutionAddress":"Sensengasse 2a,Wien,District,AT,1090", "DeviceSerialNumber":"46071", "StationName":"AWP46071", "BodyPartExamined":"BRAIN", "PatientPosition":"HFS", "ProcedureStepDescription":"FRANK^spider20", "SoftwareVersions":"syngo MR E11", "MRAcquisitionType":"2D", "SeriesDescription":"gre_field_mapping_bigFOV", "ProtocolName":"gre_field_mapping_bigFOV", "ScanningSequence":"GR", "SequenceVariant":"SP", "SequenceName":"*fm2d2r", "ImageType":[ "ORIGINAL", "PRIMARY", "P", "ND", "PHASE" ], "SeriesNumber": 14, "AcquisitionTime":"15:52:58.017500", "AcquisitionNumber": 1, "SliceThickness": 3.5, "SpacingBetweenSlices": 3.85, "SAR": 0.154313, "EchoNumber": 2, "EchoTime": 0.00738, "RepetitionTime": 0.4, "FlipAngle": 60, "EchoTime1": 0.00492, "EchoTime2": 0.00738, "PartialFourier": 1, "BaseResolution": 128, "ShimSetting":[ 8885, 10359, 4156, 752, -960, 342, 312, -46 ], "TxRefAmp": 343.703, "PhaseResolution": 1, "ReceiveCoilName":"Head_32", "ReceiveCoilActiveElements":"HEA;HEP", "PulseSequenceDetails":"%SiemensSeq%\\gre_field_mapping", "ConsistencyInfo":"N4_VE11A_LATEST_20140830", "PercentPhaseFOV": 100, "PercentSampling": 100, "PhaseEncodingSteps": 128, "AcquisitionMatrixPE": 128, "ReconMatrixPE": 128, "PixelBandwidth": 290, "DwellTime": 1.35e-05, "PhaseEncodingDirection":"i", "SliceTiming":[ 0.20312, 0, 0.21875, 0.01562, 0.23438, 0.03125, 0.23438, 0.04688, 0.25, 0.04688, 0.26562, 0.0625, 0.26562, 0.07812, 0.28125, 0.07812, 0.29688, 0.09375, 0.3125, 0.10938, 0.3125, 0.125, 0.32812, 0.125, 0.34375, 0.14062, 0.34375, 0.15625, 0.35938, 0.15625, 0.375, 0.17188, 0.375, 0.1875, 0.39062, 0.1875 ], "ImageOrientationPatientDICOM":[ 0.999673, 0.00155079, 0.0255338, -5.528e-12, 0.998161, -0.0606233 ], "InPlanePhaseEncodingDirectionDICOM":"ROW", "ConversionSoftware":"dcm2niix", "ConversionSoftwareVersion":"v1.0.20201102", "IntendedFor":[ "func/sub-03_task-restpost_bold.nii.gz", "func/sub-03_task-restpre_bold.nii.gz" ], "B0FieldIdentifier":"phasediff_fmap", "GradientSetType":"Fast", "MRTransmitCoilSequence":"Standard", "MatrixCoilMode":"SENSE", "CoilCombinationMethod":"Sum of Squares", "PulseSequenceType":"Normal", "ScanOptions":"%SiemensSeq%\\gre_field_mapping", "MTState": false, "SpoilingState": false, "NumberShots": 128, "ParallelReductionFactorInPlane": 1, "ParallelReductionFactorOutOfPlane": 1, "ParallelAcquisitionTechnique":"None", "PartialFourierDirection":"None", "EffectiveEchoSpacing": 1.35e-05, "MixingTime": 0, "TotalReadoutTime": 0.0017, "ImageOrientationText":"Tra>Cor(-1.5)>Sag(-1.4)", "SliceEncodingDirection":"k", "MultibandAccelerationFactor": 2, "InversionTime": 0.000212 }


Hi @gerardyu,

Please fill out the remainder of the software support, which provides important information we can use to help you debug your issue. You can see on the openneuro site that they already ran fmriprep and they had SDC work fine, but did not have a fmap directory due to an old version (20.2.6). Perhaps also try the B0FieldSource/Identifier method? Does the HTML indicate SDC was performed?

Best,
Steven

I have added in the other details.

No there wasn’t mention of SDC in the .html file. How can i do the B0FieldSource/Identifier method?

Hi @gerardyu,

Please use a container to run fmriprep.

In phasediff json, assign B0FieldIdentifer as some unique string (e.g., "sub-xx_fmap-taskxx"). In associated bold json, assign B0FieldSource as "sub-xx_fmap-taskxx".

Best,
Steven

I’ve just tried the B0FieldSource/Identifier method and it did not work

Did you use a container?