Dear experts,
I get the same error: ‘Error 1: [Code 1] NOT_INCLUDED’
I used dcm2bids to generate this output:
The validator tells me I have a naming error in the following files:
dcm2bids_out/sub-001/ses-001/fmap/sub-001_ses-001_phase.json
dcm2bids_out/sub-001/ses-001/fmap/sub-001_ses-001_phase.nii.gz
dcm2bids_out/sub-001/ses-001/func/sub-001_ses-001_run-01_bold.json
dcm2bids_out/sub-001/ses-001/func/sub-001_ses-001_run-01_bold.nii.gz
dcm2bids_out/sub-001/ses-001/func/sub-001_ses-001_run-02_bold.json
dcm2bids_out/sub-001/ses-001/func/sub-001_ses-001_run-02_bold.nii.gz
I tried adding _task-taskName
after the session, but no luck…
Is it somewhat obvious what is wrong maybe?
Thank you!
Marco
Steven
July 19, 2024, 6:34pm
2
Hi @marco5790 ,
For future posts, text formatted as code (e.g., like this
) is preferable to plain text or screenshots. You can see I edited it for you above.
Phase is not a valid fmap suffix, did you mean phasediff
?
Task label is required.
Can you please print the full BIDS validator output after making these changes, as code formatted text
like this (use </> button in text editor)
?
Best,
Steven
Hi Steven,
I got rid of the validator errors by chaning phase to phasediff and adding a taskname by hand - thank you!
However - how do I get dcm2bids to automatically add a taskname?
This config entry does not seem to do the trick:
"sidecar_changes": {
"TaskName": "SST"
}
Thank you!
Marco
Steven
July 22, 2024, 3:38pm
4
Hi @marco5790 ,
Glad you got it working! As you can see in the documentation , task name an be specified as in custom_entities
for it to be reflected in file names.
Best,
Steven
Hi Steven,
I added custom entities:
{
"id": "id_task_rest",
"datatype": "func",
"suffix": "bold",
"custom_entities": "rest",
"criteria": {
"ProtocolName": "*boldB_TRR-rest*"
},
"sidecar_changes": {
"TaskName": "rest"
}
},
But still the task is not added to the files:
└── ses-001
├── anat
│ ├── sub-001_ses-001_T1w.json
│ └── sub-001_ses-001_T1w.nii.gz
├── fmap
│ ├── sub-001_ses-001_magnitude1.json
│ ├── sub-001_ses-001_magnitude1.nii.gz
│ ├── sub-001_ses-001_magnitude2.json
│ ├── sub-001_ses-001_magnitude2.nii.gz
│ ├── sub-001_ses-001_phasediff.json
│ └── sub-001_ses-001_phasediff.nii.gz
└── func
├── sub-001_ses-001_run-01_bold.json
├── sub-001_ses-001_run-01_bold.nii.gz
├── sub-001_ses-001_run-02_bold.json
└── sub-001_ses-001_run-02_bold.nii.gz
In case you want to look at the full json, I added it as txt below
Thank you!
Marco
dcm2bids_config_10101-prisma-12.txt (2.0 KB)
Steven
July 22, 2024, 4:58pm
6
Hi @marco5790 ,
For future posts, please format your text as code so it appears more reabable by adding tickmarks or using the </>
button in the text editor. You can see I edited your post this time.
As you can see in the documentation it needs to be "task-rest"
.
Best,
Steven
There are no more errors from the validator.
Thank you so much Steven!
Hey Steven,
with the exact same data and the same config file as above, I now get two errors and lots of warnings:
I don’t really know how to approach these errors.
What changed since my last post in this thread (when there were no errors):
dcm2niix was updated
dcm2bids was updated
the bids validator website looks a bit different
Have you maybe encountered this before?
Thank you!
Marco
Steven
August 15, 2024, 5:54pm
9
Hi @marco5790 ,
For the first error, I think simply removing the two named fields would suffice. For the other one, you should make sure the TR implied by the nifti header (e.g., output from fslinfo
) matches that in the JSON. You did not expand the other warnings so I cannot help you with those.
Best,
Steven
Hey Steven,
I was able to get rid of the first error by deleting the AcquisitionDuration field from the json, which however would require an extra script for larger datasets then I guess.
The TR error is more puzzling. According to the nifti meta data (read with Matlab) the value is the same as in the json. I even changed the json value from 0.089 to 0.0890 to match the value I get with Matlab exanctly - but no luck.
Everything was working fine a month ago before the update (same data and config file). Maybe it would make sense to use version 3.1.1 instead of 3.2.0 then?
Unless it is the validator that changed?
Thank you!
Marco
Steven
August 16, 2024, 4:07pm
11
Hi @marco5790 ,
I would bet it is a change in the validator raising those error.
As long as it works with the validator packaged with the software you want to use you should be fine.
Best,
Steven
I made an issue in the validator repository regarding the RepetitionTime error:
opened 07:14PM - 16 Aug 24 UTC
https://neurostars.org/t/bids-naming-question-code-1-not-included/30005/9
Leg… acy cast to number and limits precision:
```
const niftiTR = Number(repetitionTime).toFixed(3)
const jsonTR = Number(mergedDictionary.RepetitionTime).toFixed(3)
if (niftiTR !== jsonTR) {
```
Schema on the other hand has:
```
- sidecar.RepetitionTime == nifti_header.pixdim[4]
```
I’m not sure if this will be fixed with changes to the validator itself or the schema.
@Steven : Sorry, but what do you mean by " the validator packaged with the software you want to use"?
Is there another validator than this one
https://bids-standard.github.io/bids-validator/
?
Thank you!
@rwblair : Thank you - lets see where the discussion goes then.
Steven
August 22, 2024, 1:14pm
14
Hi @marco5790 ,
A version of the validator is packaged internally within fmriprep containers, and other BIDS apps.
Best,
Steven
Hi @Steven ,
I got fmriprep to run with this command:
sudo docker run -ti --rm -v /mnt/c/Users/marco/HiDrive/KKB/QA/dcm2bids_mriqc_pipeline/dcm2bids_out/:/data:ro -v /mnt/c/Users/marco/HiDrive/KKB/QA/dcm2bids_mriqc_pipeline/fmriprep_out/:/out -v /mnt/c/Users/marco/Downloads/license.txt:/opt/freesurfer/license.txt nipreps/fmriprep /data /out/out participant
It told me that “fMRIPrep finished successfully!” after 5.5 hours. Does that mean my dataset has also been validated successfully as a BIDS dataset? Or is there another command to or output to double check this, maybe also quicker?
Thank you!
Marco
Steven
September 1, 2024, 3:56pm
16
Hi @marco5790 ,
As long as you did not —skip-bids-validation
the BIDS validation report would be at the top of the job log. That the job finished successfully implies it is at least valid enough to run.
Best,
Steven