I’m stumped by this error, hoping someone has some ideas:
This the error message from running bids-validator (within the HCP pipeline):
1: [ERR] 'IntendedFor' field needs to point to an existing file. (code: 37 - INTENDED_FOR)
./sub-XXXX/ses-1/fmap/sub-XXXX_ses-1_run-1_fieldmap.nii.gz
Evidence: ses-1/func/sub-C026_ses-1_task-SWT1_dir-PA_run-4_bold.nii.gz
./sub-XXXX/ses-1/fmap/sub-XXXX_ses-1_run-2_fieldmap.nii.gz
Evidence: ses-1/func/sub-XXXX_ses-1_task-PAS_dir-PA_run-2_bold.nii.gz
ls BIDS_HCP/NIFTI/sub-XXXX/ses-1/func/sub-XXXX_ses-1_task-SWT1_dir-PA_run-4_bold.nii.gz
BIDS_HCP/NIFTI/sub-XXXX/ses-1/func/sub-XXXX_ses-1_task-SWT1_dir-PA_run-4_bold.nii.gz
ls BIDS_HCP/NIFTI/sub-XXXX/ses-1/func/sub-XXXX_ses-1_task-PAS_dir-PA_run-2_bold.nii.gz
BIDS_HCP/NIFTI/sub-XXXX/ses-1/func/sub-XXXX_ses-1_task-PAS_dir-PA_run-2_bold.nii.gz
These files clearly exist, and the bids_validator seems to have no problem with the other functional files (runs 1-3 for SWT1 and run 1 for PAS).
The one thing I can think of, which makes these two files unique compared to the others, is that they are the last one referred to in the intendedfor list (there are two field maps, labeled with run-1/2), although still not sure why that would throw an error???
Not sure what you mean by not a valid suffix name, see option #3 in the document you refer to (direct field mapping, as is produced by the philips scanner).
See attached file (extension changed from json to txt to allow attachment). File generated by dcm2niix, with additional fields for IntendedFor’s and Units. sub-XXXX_ses-1_run-1_fieldmap.txt (2.0 KB)
In your text file, you have each nifti under its own IntendedFor argument, when you should only have one IntendedFor field that contains a list of each nifti.
Thanks, but that doesn’t seem to have fixed the problem, still get the same error with that format. I’ve gotten rid of all of the functional tasks but one, so now there is only one file in the intendedFor list, and it’s still failing. And I’m getting what seems to be contradictory error messages, because if I intentionally name the file incorrectly, then I get an error that the IntendedFor field has to point to an existing file, I don’t get that error when the file is correctly named, but then get the error that there is no field map for that file???
Sorry, one thing I should have pointed out before, although not sure it is relevant. The bids-validator is being run within the singularity package of the HCP pipeline.
Here’s the full run command and error traceback (I’m not worried about the warnings, haven’t copied the event files over, first need to figure out this issue):
singularity run --bind /gs/gsfs0/users/mrrc-all/PROJECTS/P65-ALL/,/gs/gsfs0/hpc02/users/mrrc-all/PROJECTS/P65-ALL/:/mnt SCRIPTS/hcppipelines_latest.sif --participant_label ${subj} --stages fMRIVolume --license_key “48146” --anat_unwarpdir x /mnt/BIDS_HCP/NIFTI/ /mnt/BIDS_HCP/hcp_output/ participant
INFO: Converting SIF file to temporary sandbox…
WARNING: underlay of /usr/share/zoneinfo/Etc/UTC required more than 50 (73) bind mounts
bids-validator /mnt/BIDS_HCP/NIFTI/
bids-validator@1.7.2
1: [WARN] You should define 'EffectiveEchoSpacing' for this file. If you don't provide this information field map correction will not be possible. (code: 8 - EFFECTIVE_ECHO_SPACING_NOT_DEFINED)
./sub-XXXX/ses-1/dwi/sub-XXXX_ses-1_dir-AP_dwi.nii.gz
./sub-XXXX/ses-1/dwi/sub-XXXX_ses-1_dir-PA_dwi.nii.gz
Please visit https://neurostars.org/search?q=EFFECTIVE_ECHO_SPACING_NOT_DEFINED for existing conversations about this issue.
2: [WARN] You should define 'TotalReadoutTime' for this file. If you don't provide this information field map correction using TOPUP might not be possible. (code: 9 - TOTAL_READOUT_TIME_NOT_DEFINED)
./sub-XXXX/ses-1/dwi/sub-XXXX_ses-1_dir-AP_dwi.nii.gz
./sub-XXXX/ses-1/dwi/sub-XXXX_ses-1_dir-PA_dwi.nii.gz
Please visit https://neurostars.org/search?q=TOTAL_READOUT_TIME_NOT_DEFINED for existing conversations about this issue.
3: [WARN] Task scans should have a corresponding events.tsv file. If this is a resting state scan you can ignore this warning or rename the task to include the word "rest". (code: 25 - EVENTS_TSV_MISSING)
./sub-XXXX/ses-1/func/sub-XXXX_ses-1_task-PAS_run-1_bold.nii.gz
./sub-XXXX/ses-1/func/sub-XXXX_ses-1_task-PAS_run-2_bold.nii.gz
./sub-XXXX/ses-1/func/sub-XXXX_ses-1_task-SWT1_run-1_bold.nii.gz
./sub-XXXX/ses-1/func/sub-XXXX_ses-1_task-SWT1_run-2_bold.nii.gz
./sub-XXXX/ses-1/func/sub-XXXX_ses-1_task-SWT1_run-3_bold.nii.gz
./sub-XXXX/ses-1/func/sub-XXXX_ses-1_task-SWT1_run-4_bold.nii.gz
./sub-XXXX/ses-1/func/sub-XXXX_ses-1_task-SWT2_run-1_bold.nii.gz
./sub-XXXX/ses-1/func/sub-XXXX_ses-1_task-SWT2_run-2_bold.nii.gz
./sub-XXXX/ses-1/func/sub-XXXX_ses-1_task-SWT2_run-3_bold.nii.gz
./sub-XXXX/ses-1/func/sub-XXXX_ses-1_task-SWT2_run-4_bold.nii.gz
Please visit https://neurostars.org/search?q=EVENTS_TSV_MISSING for existing conversations about this issue.
4: [WARN] The Authors field of dataset_description.json should contain an array of fields - with one author per field. This was triggered based on the presence of only one author field. Please ignore if all contributors are already properly listed. (code: 102 - TOO_FEW_AUTHORS)
Please visit https://neurostars.org/search?q=TOO_FEW_AUTHORS for existing conversations about this issue.
Summary: Available Tasks: Available Modalities:
62 Files, 1.02GB PAS T1w
1 - Subject SWT1 T2w
1 - Session SWT2 dwi
bold
sbref
fieldmap
If you have any questions, please post on https://neurostars.org/tags/bids.
Traceback (most recent call last):
File “/run.py”, line 435, in
f"No fieldmaps found for BOLD {fmritcs}. Consider --procesing_mode [legacy | auto ]."
AssertionError: No fieldmaps found for BOLD /mnt/BIDS_HCP/NIFTI/sub-XXXX/ses-1/func/sub-XXXX_ses-1_task-PAS_run-1_bold.nii.gz. Consider --procesing_mode [legacy | auto ].
INFO: Cleaning up image…
Thanks! I didn’t see that, although had already tried earlier today to convert the fieldmaps to phasediff’s and was still getting the same errors. But I hadn’t deleted the fieldmap images, will see if that was causing the problem.