bids-standard / legacy-validator

Validator for the Brain Imaging Data Structure
https://bids-standard.github.io/legacy-validator/
MIT License
186 stars 111 forks source link

Error 1: [Code 1] NOT_INCLUDED in valid (?) filenames across dataset and more errors #1984

Closed alessandra-rampinini closed 5 months ago

alessandra-rampinini commented 5 months ago

Dear all, I am validating a dataset and keep running into Code 1 / Code 4 (alternatively), plus I get different errors based on if i run the online or the node.js validator.

CODE 1 / 4 PROBLEM: Here below a list of my filenames for 1 of 100 subjects (as an example): before you read on, please know that I replaced _defaced with -defaced, _bold with -bold etc, because I was getting a SESSION error (incorrect hyphen or dash) and this fixed that one error. But I??m still getting this code 1 and I am out of solutions. Any help would be appreciated. Here below my files as I was saying

nebula101/sub-pp001/ses-01/anat:
sub-pp001_ses-01_T1w-defaced.json sub-pp001_ses-01_T1w-defaced.nii.gz

nebula101/sub-pp001/ses-01/dwi:
sub-pp001_ses-01_dwi.bval sub-pp001_ses-01_dwi.json
sub-pp001_ses-01_dwi.bvec sub-pp001_ses-01_dwi.nii.gz

nebula101/sub-pp001/ses-01/fmap:
sub-pp001_ses-01_fid-alpha-magnitude1.json
sub-pp001_ses-01_fid-alpha-magnitude1.nii.gz
sub-pp001_ses-01_fid-alpha-magnitude2.json
sub-pp001_ses-01_fid-alpha-magnitude2.nii.gz
sub-pp001_ses-01_fid-alpha_phasediff.json
sub-pp001_ses-01_fid-alpha_phasediff.nii.gz
sub-pp001_ses-01_fid-beta-magnitude1.json
sub-pp001_ses-01_fid-beta-magnitude1.nii.gz
sub-pp001_ses-01_fid-beta-magnitude2.json
sub-pp001_ses-01_fid-beta-magnitude2.nii.gz
sub-pp001_ses-01_fid-beta_phasediff.json
sub-pp001_ses-01_fid-beta_phasediff.nii.gz

nebula101/sub-pp001/ses-01/func:
sub-pp001_ses-01_task-aliceloc_run-001-bold.json
sub-pp001_ses-01_task-aliceloc_run-001-bold.nii.gz
sub-pp001_ses-01_task-aliceloc_run-001-events.json
sub-pp001_ses-01_task-aliceloc_run-001-events.tsv
sub-pp001_ses-01_task-aliceloc_run-002-bold.json
sub-pp001_ses-01_task-aliceloc_run-002-bold.nii.gz
sub-pp001_ses-01_task-aliceloc_run-002-events.json
sub-pp001_ses-01_task-aliceloc_run-002-events.tsv
sub-pp001_ses-01_task-aliceloc_run-003-bold.json
sub-pp001_ses-01_task-aliceloc_run-003-bold.nii.gz
sub-pp001_ses-01_task-aliceloc_run-003-events.json
sub-pp001_ses-01_task-aliceloc_run-003-events.tsv
sub-pp001_ses-01_task-rest_run-001-bold.json
sub-pp001_ses-01_task-rest_run-001-bold.nii.gz
sub-pp001_ses-01_task-rest_run-001-events.tsv

CODE 2 PROBLEM: node.js below:

Code 2: [ERR] We were unable to parse header data from this NIfTI file. Please ensure it is not corrupted or mislabeled. (code: 26 - NIFTI_HEADER_UNREADABLE)
        ./sub-pp001/ses-01/dwi/sub-pp001_ses-01_dwi.nii.gz
        ./sub-pp003/ses-01/func/sub-pp003_ses-01_task-rest_run-001_bold.nii.gz
        ./sub-pp023/ses-01/func/sub-pp023_ses-01_task-aliceloc_run-003_bold.nii.gz
        ./sub-pp026/ses-01/func/sub-pp026_ses-01_task-aliceloc_run-001_bold.nii.gz
        ./sub-pp125/ses-01/func/sub-pp125_ses-01_task-aliceloc_run-001_bold.nii.gz
        ./sub-pp152/ses-01/dwi/sub-pp152_ses-01_dwi.nii.gz
        ./sub-pp170/ses-01/func/sub-pp170_ses-01_task-aliceloc_run-003_bold.nii.gz

online validator below:

Error 2: [Code 26] NIFTI_HEADER_UNREADABLE

Click here for more information about this issue
We were unable to parse header data from this NIfTI file. Please ensure it is not corrupted or mislabeled.2 files
sub-pp001_ses-01_dwi.nii.gz
147792.147 KB | application/gzip
Location:

nebula101/sub-pp001/ses-01/dwi/sub-pp001_ses-01_dwi.nii.gz
Reason:

We were unable to parse header data from this NIfTI file. Please ensure it is not corrupted or mislabeled.

sub-pp152_ses-01_dwi.nii.gz
147560.947 KB | application/gzip
Location:

nebula101/sub-pp152/ses-01/dwi/sub-pp152_ses-01_dwi.nii.gz
Reason:

We were unable to parse header data from this NIfTI file. Please ensure it is not corrupted or mislabeled.

Please help a newbie out here...

effigies commented 5 months ago

This is being addressed on Neurostars: https://neurostars.org/t/error-1-code-1-not-included-in-valid-filenames-across-dataset/29600