Dataset indexing: ignore a directory

Hello, it did not find a clean way to ignore a directory inside the bids root. I have a logs directory, duly included in .bidsignore. For ease of tracking i changed the naming conventions of logs, that now are called sub-xx_ses-yyy. From teh change, fmriprep (teh PyBIDS step, I think) is including phantom sessions, eg sessions once present but then discarded. Apparently the indexing process enters in logs/ and indexes teh names of (deleted) sessions that are still present as log files. Of course, I can delete the logs, but it would be much more easy to just ignore the logs folder. Is there an appropriate option?

Best ergards, federico

Hi @Federico_G ,

It is hard to precisely help without you providing the information that is asked for in the Software Support post template. But why not just put the logs folder somewhere else, like in the code folder?

Best,

Steven

Sorry, the template did not pop up, probably because I started typing before selecting a category.

See the information below.

I could place the logs inside the code directory. However, this does not feel particularly clean.

It would be preferable if the data parsing process respected .bidsignore (or a similar exclusion list), so that files and directories explicitly marked to be ignored would not be parsed.

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

docker run \
--tmpfs /run \
--tmpfs /tmp \
-it --rm \
-v /opt/fmriprep/freesurfer_license.txt:/opt/freesurfer/license.txt:ro \
-v /opt/paminabids/XXX/YYY:/data:ro \
-v /opt/paminabids/XXX/YYY/derivatives/fmriprep:/out \
-v /tmp/tp5b4ca394_c047_4b1d_962c_fd023c499070:/scratch \
nipreps/fmriprep:25.2.5 \
/data /out participant \
--participant-label 00282170 \
--nprocs 20 --omp-nthreads 4 \
--md-only-boilerplate --write-graph \
--me-output-echos \
--clean-workdir \
--subject-anatomical-reference sessionwise \
--bold2anat-init t1w \
--skip_bids_validation \
-w /scratch \
--output-spaces MNI152NLin2009cAsym:res-native

Version:

25.2.5

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

docker

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

NO, but non-standard items not relevant to teh current issue

Could not initialize cache database '/deno-dir/dep_analysis_cache_v2', deleting and retrying... (SqliteFailure(Error { code: CannotOpen, extended_code: 14 }, Some("unable to open database file: /deno-dir/dep_analysis_cache_v2")))
Failed to open cache file '/deno-dir/dep_analysis_cache_v2', opening in-memory cache.
Could not initialize cache database '/deno-dir/v8_code_cache_v2', deleting and retrying... (SqliteFailure(Error { code: CannotOpen, extended_code: 14 }, Some("unable to open database file: /deno-dir/v8_code_cache_v2")))
Could not initialize cache database '/deno-dir/node_analysis_cache_v2', deleting and retrying... (SqliteFailure(Error { code: CannotOpen, extended_code: 14 }, Some("unable to open database file: /deno-dir/node_analysis_cache_v2")))
Failed to open cache file '/deno-dir/v8_code_cache_v2', performance may be degraded.
Failed to open cache file '/deno-dir/node_analysis_cache_v2', opening in-memory cache.
	e[33m[WARNING] TOO_FEW_AUTHORS The 'Authors' field of 'dataset_description.json' should contain an array of values -
with one author per value.
This was triggered based on the presence of only one author field.
Please ignore if all contributors are already properly listed.e[39m
		/dataset_description.json

e[36m	Please visit https://neurostars.org/search?q=TOO_FEW_AUTHORS for existing conversations about this issue.e[39m

	e[33m[WARNING] EMPTY_DATASET_NAME The Name field of dataset_description.json is present but empty of visible characters.e[39m
		/dataset_description.json

e[36m	Please visit https://neurostars.org/search?q=EMPTY_DATASET_NAME for existing conversations about this issue.e[39m

	e[33m[WARNING] JSON_KEY_RECOMMENDED A JSON file is missing a key listed as recommended.e[39m
		e[33mHEDVersione[39m
		/dataset_description.json - Field description: If HED tags are used:
The version of the HED schema used to validate HED tags for study.
May include a single schema or a base schema and one or more library schema.

		e[33mGeneratedBye[39m
		/dataset_description.json - Field description: Used to specify provenance of the dataset.

		e[33mSourceDatasetse[39m
		/dataset_description.json - Field description: Used to specify the locations and relevant attributes of all source datasets (BIDS or not).
Valid keys in each object include e[36m"URL"e[39m, e[36m"DOI"e[39m (see
e[34mURIe[39m (e[90mhttps://bids-specification.readthedocs.io/en/stable/common-principles.md#uniform-resource-indicatore[39m)), and
e[36m"Version"e[39m with
e[34mstringe[39m (e[90mhttps://www.w3schools.com/js/js_json_datatypes.aspe[39m)
values.

e[36m	Please visit https://neurostars.org/search?q=JSON_KEY_RECOMMENDED for existing conversations about this issue.e[39m

	e[33m[WARNING] TSV_ADDITIONAL_COLUMNS_UNDEFINED A TSV file has extra columns which are not defined in its associated JSON sidecare[39m
		e[33mgroupe[39m
		/participants.tsv

e[36m	Please visit https://neurostars.org/search?q=TSV_ADDITIONAL_COLUMNS_UNDEFINED for existing conversations about this issue.e[39m

	e[33m[WARNING] SIDECAR_KEY_RECOMMENDED A data file's JSON sidecar is missing a key listed as recommended.e[39m
		e[33mPulseSequenceTypee[39m
		/sub-00002130/ses-20250909/anat/sub-00002130_ses-20250909_acq-hippocampus_T2w.nii.gz - Field description: A general description of the pulse sequence used for the scan.
		/sub-00002130/ses-20250909/anat/sub-00002130_ses-20250909_acq-QSM_echo-1_part-mag_MEGRE.nii.gz - Field description: A general description of the pulse sequence used for the scan.

		32172 more files with the same issue

		e[33mSpoilingTypee[39m
		/sub-00002130/ses-20250909/anat/sub-00002130_ses-20250909_acq-hippocampus_T2w.nii.gz - Field description: Specifies which spoiling method(s) are used by a spoiled sequence.
		/sub-00002130/ses-20250909/anat/sub-00002130_ses-20250909_acq-T1memprage_echo-1_MEGRE.nii.gz - Field description: Specifies which spoiling method(s) are used by a spoiled sequence.

		4742 more files with the same issue

		e[33mPartialFourierDirectione[39m
		/sub-00002130/ses-20250909/anat/sub-00002130_ses-20250909_acq-hippocampus_T2w.nii.gz - Field description: The direction where only partial Fourier information was collected.
Corresponds to e[34mDICOM Tag 0018, 9036e[39m (e[90mhttp://www.dicomlookup.com/dicomtags/(0018,9036)e[39m)
e[36mPartial Fourier Directione[39m.
		/sub-00002130/ses-20250909/anat/sub-00002130_ses-20250909_acq-QSM_echo-1_part-mag_MEGRE.nii.gz - Field description: The direction where only partial Fourier information was collected.
Corresponds to e[34mDICOM Tag 0018, 9036e[39m (e[90mhttp://www.dicomlookup.com/dicomtags/(0018,9036)e[39m)
e[36mPartial Fourier Directione[39m.

		32172 more files with the same issue

		e[33mMatrixCoilModee[39m
		/sub-00002130/ses-20250909/anat/sub-00002130_ses-20250909_FLAIR.nii.gz - Field description: (If used)
A method for reducing the number of independent channels by combining in
analog the signals from multiple coil elements.
There are typically different default modes when using un-accelerated or
accelerated (for example, e[36m"GRAPPA"e[39m, e[36m"SENSE"e[39m) imaging.
		/sub-00002130/ses-20250909/dwi/sub-00002130_ses-20250909_acq-DFCMIX8b30032b100071b2500_dir-AP_dwi.nii.gz - Field description: (If used)
A method for reducing the number of independent channels by combining in
analog the signals from multiple coil elements.
There are typically different default modes when using un-accelerated or
accelerated (for example, e[36m"GRAPPA"e[39m, e[36m"SENSE"e[39m) imaging.

		17408 more files with the same issue

		e[33mInstructionse[39m
		/sub-00002130/ses-20250909/func/sub-00002130_ses-20250909_task-rest_run-1_echo-1_bold.nii.gz - Field description: Text of the instructions given to participants before the recording.
		/sub-00002130/ses-20250909/func/sub-00002130_ses-20250909_task-rest_run-1_echo-2_bold.nii.gz - Field description: Text of the instructions given to participants before the recording.

		2248 more files with the same issue

		e[33mTaskDescriptione[39m
		/sub-00002130/ses-20250909/func/sub-00002130_ses-20250909_task-rest_run-1_echo-1_bold.nii.gz - Field description: Longer description of the task.
		/sub-00002130/ses-20250909/func/sub-00002130_ses-20250909_task-rest_run-1_echo-2_bold.nii.gz - Field description: Longer description of the task.

		2248 more files with the same issue

		e[33mCogAtlasIDe[39m
		/sub-00002130/ses-20250909/func/sub-00002130_ses-20250909_task-rest_run-1_echo-1_bold.nii.gz - Field description: e[34mURIe[39m (e[90mhttps://bids-specification.readthedocs.io/en/stable/common-principles.md#uniform-resource-indicatore[39m)
of the corresponding e[34mCognitive Atlase[39m (e[90mhttps://www.cognitiveatlas.org/e[39m)
Task term.
		/sub-00002130/ses-20250909/func/sub-00002130_ses-20250909_task-rest_run-1_echo-2_bold.nii.gz - Field description: e[34mURIe[39m (e[90mhttps://bids-specification.readthedocs.io/en/stable/common-principles.md#uniform-resource-indicatore[39m)
of the corresponding e[34mCognitive Atlase[39m (e[90mhttps://www.cognitiveatlas.org/e[39m)
Task term.

		2248 more files with the same issue

		e[33mCogPOIDe[39m
		/sub-00002130/ses-20250909/func/sub-00002130_ses-20250909_task-rest_run-1_echo-1_bold.nii.gz - Field description: e[34mURIe[39m (e[90mhttps://bids-specification.readthedocs.io/en/stable/common-principles.md#uniform-resource-indicatore[39m)
of the corresponding e[34mCogPOe[39m (e[90mhttp://www.cogpo.org/e[39m) term.
		/sub-00002130/ses-20250909/func/sub-00002130_ses-20250909_task-rest_run-1_echo-2_bold.nii.gz - Field description: e[34mURIe[39m (e[90mhttps://bids-specification.readthedocs.io/en/stable/common-principles.md#uniform-resource-indicatore[39m)
of the corresponding e[34mCogPOe[39m (e[90mhttp://www.cogpo.org/e[39m) term.

		2248 more files with the same issue

		e[33mVascularCrushinge[39m
		/sub-00002130/ses-20250909/perf/sub-00002130_ses-20250909_acq-con_asl.nii.gz - Field description: Boolean indicating if Vascular Crushing is used.
Corresponds to e[34mDICOM Tag 0018, 9259e[39m (e[90mhttp://www.dicomlookup.com/dicomtags/(0018,9259)e[39m)
e[36mASL Crusher Flage[39m.
		/sub-00002130/ses-20250909/perf/sub-00002130_ses-20250909_acq-lab_asl.nii.gz - Field description: Boolean indicating if Vascular Crushing is used.
Corresponds to e[34mDICOM Tag 0018, 9259e[39m (e[90mhttp://www.dicomlookup.com/dicomtags/(0018,9259)e[39m)
e[36mASL Crusher Flage[39m.

		6792 more files with the same issue

		e[33mAcquisitionVoxelSizee[39m
		/sub-00002130/ses-20250909/perf/sub-00002130_ses-20250909_acq-con_asl.nii.gz - Field description: An array of numbers with a length of 3, in millimeters.
This field denotes the original acquisition voxel size,
excluding any inter-slice gaps and before any interpolation or resampling
within reconstruction or image processing.
Any point spread function effects, for example due to T2-blurring,
that would decrease the effective resolution are not considered here.
		/sub-00002130/ses-20250909/perf/sub-00002130_ses-20250909_acq-con_m0scan.nii.gz - Field description: An array of numbers with a length of 3, in millimeters.
This field denotes the original acquisition voxel size,
excluding any inter-slice gaps and before any interpolation or resampling
within reconstruction or image processing.
Any point spread function effects, for example due to T2-blurring,
that would decrease the effective resolution are not considered here.

		9497 more files with the same issue

		e[33mLabelingOrientatione[39m
		/sub-00002130/ses-20250909/perf/sub-00002130_ses-20250909_acq-con_asl.nii.gz - Field description: Orientation of the labeling plane (e[36m(P)CASLe[39m) or slab (e[36mPASLe[39m).
The direction cosines of a normal vector perpendicular to the ASL labeling
slab or plane with respect to the patient.
Corresponds to e[34mDICOM Tag 0018, 9255e[39m (e[90mhttp://www.dicomlookup.com/dicomtags/(0018,9255)e[39m)
e[36mASL Slab Orientatione[39m.
		/sub-00002130/ses-20250909/perf/sub-00002130_ses-20250909_acq-lab_asl.nii.gz - Field description: Orientation of the labeling plane (e[36m(P)CASLe[39m) or slab (e[36mPASLe[39m).
The direction cosines of a normal vector perpendicular to the ASL labeling
slab or plane with respect to the patient.
Corresponds to e[34mDICOM Tag 0018, 9255e[39m (e[90mhttp://www.dicomlookup.com/dicomtags/(0018,9255)e[39m)
e[36mASL Slab Orientatione[39m.

		6792 more files with the same issue

		e[33mLabelingDistancee[39m
		/sub-00002130/ses-20250909/perf/sub-00002130_ses-20250909_acq-con_asl.nii.gz - Field description: Distance from the center of the imaging slab to the center of the labeling
plane (e[36m(P)CASLe[39m) or the leading edge of the labeling slab (e[36mPASLe[39m),
in millimeters.
If the labeling is performed inferior to the isocenter,
this number should be negative.
Based on DICOM macro C.8.13.5.14.
		/sub-00002130/ses-20250909/perf/sub-00002130_ses-20250909_acq-lab_asl.nii.gz - Field description: Distance from the center of the imaging slab to the center of the labeling
plane (e[36m(P)CASLe[39m) or the leading edge of the labeling slab (e[36mPASLe[39m),
in millimeters.
If the labeling is performed inferior to the isocenter,
this number should be negative.
Based on DICOM macro C.8.13.5.14.

		6792 more files with the same issue

		e[33mLabelingLocationDescriptione[39m
		/sub-00002130/ses-20250909/perf/sub-00002130_ses-20250909_acq-con_asl.nii.gz - Field description: Description of the location of the labeling plane (e[36m"CASL"e[39m or e[36m"PCASL"e[39m) or
the labeling slab (e[36m"PASL"e[39m) that cannot be captured by fields
e[36mLabelingOrientatione[39m or e[36mLabelingDistancee[39m.
May include a link to a deidentified screenshot of the planning of the
labeling slab/plane with respect to the imaging slab or slices
e[36m*_asllabeling.*e[39m.
Based on DICOM macro C.8.13.5.14.
		/sub-00002130/ses-20250909/perf/sub-00002130_ses-20250909_acq-lab_asl.nii.gz - Field description: Description of the location of the labeling plane (e[36m"CASL"e[39m or e[36m"PCASL"e[39m) or
the labeling slab (e[36m"PASL"e[39m) that cannot be captured by fields
e[36mLabelingOrientatione[39m or e[36mLabelingDistancee[39m.
May include a link to a deidentified screenshot of the planning of the
labeling slab/plane with respect to the imaging slab or slices
e[36m*_asllabeling.*e[39m.
Based on DICOM macro C.8.13.5.14.

		6792 more files with the same issue

		e[33mBackgroundSuppressionNumberPulsese[39m
		/sub-00002130/ses-20250909/perf/sub-00002130_ses-20250909_acq-con_asl.nii.gz - Field description: The number of background suppression pulses used.
Note that this excludes any effect of background suppression pulses applied
before the labeling.
		/sub-00002130/ses-20250909/perf/sub-00002130_ses-20250909_acq-lab_asl.nii.gz - Field description: The number of background suppression pulses used.
Note that this excludes any effect of background suppression pulses applied
before the labeling.

		6792 more files with the same issue

		e[33mBackgroundSuppressionPulseTimee[39m
		/sub-00002130/ses-20250909/perf/sub-00002130_ses-20250909_acq-con_asl.nii.gz - Field description: Array of numbers containing timing, in seconds,
of the background suppression pulses with respect to the start of the
labeling.
In case of multi-PLD with different background suppression pulse times,
only the pulse time of the first PLD should be defined.
		/sub-00002130/ses-20250909/perf/sub-00002130_ses-20250909_acq-lab_asl.nii.gz - Field description: Array of numbers containing timing, in seconds,
of the background suppression pulses with respect to the start of the
labeling.
In case of multi-PLD with different background suppression pulse times,
only the pulse time of the first PLD should be defined.

		6792 more files with the same issue

		e[33mLabelingPulseAverageGradiente[39m
		/sub-00002130/ses-20250909/perf/sub-00002130_ses-20250909_acq-con_asl.nii.gz - Field description: The average labeling gradient, in milliteslas per meter.
		/sub-00002130/ses-20250909/perf/sub-00002130_ses-20250909_acq-lab_asl.nii.gz - Field description: The average labeling gradient, in milliteslas per meter.

		6792 more files with the same issue

		e[33mLabelingPulseMaximumGradiente[39m
		/sub-00002130/ses-20250909/perf/sub-00002130_ses-20250909_acq-con_asl.nii.gz - Field description: The maximum amplitude of the gradient switched on during the application of
the labeling RF pulse(s), in milliteslas per meter.
		/sub-00002130/ses-20250909/perf/sub-00002130_ses-20250909_acq-lab_asl.nii.gz - Field description: The maximum amplitude of the gradient switched on during the application of
the labeling RF pulse(s), in milliteslas per meter.

		6792 more files with the same issue

		e[33mLabelingPulseAverageB1e[39m
		/sub-00002130/ses-20250909/perf/sub-00002130_ses-20250909_acq-con_asl.nii.gz - Field description: The average B1-field strength of the RF labeling pulses, in microteslas.
As an alternative, e[36m"LabelingPulseFlipAngle"e[39m can be provided.
		/sub-00002130/ses-20250909/perf/sub-00002130_ses-20250909_acq-lab_asl.nii.gz - Field description: The average B1-field strength of the RF labeling pulses, in microteslas.
As an alternative, e[36m"LabelingPulseFlipAngle"e[39m can be provided.

		6792 more files with the same issue

		e[33mLabelingPulseDuratione[39m
		/sub-00002130/ses-20250909/perf/sub-00002130_ses-20250909_acq-con_asl.nii.gz - Field description: Duration of the individual labeling pulses, in milliseconds.
		/sub-00002130/ses-20250909/perf/sub-00002130_ses-20250909_acq-lab_asl.nii.gz - Field description: Duration of the individual labeling pulses, in milliseconds.

		6792 more files with the same issue

		e[33mLabelingPulseFlipAnglee[39m
		/sub-00002130/ses-20250909/perf/sub-00002130_ses-20250909_acq-con_asl.nii.gz - Field description: The flip angle of a single labeling pulse, in degrees,
which can be given as an alternative to e[36m"LabelingPulseAverageB1"e[39m.
		/sub-00002130/ses-20250909/perf/sub-00002130_ses-20250909_acq-lab_asl.nii.gz - Field description: The flip angle of a single labeling pulse, in degrees,
which can be given as an alternative to e[36m"LabelingPulseAverageB1"e[39m.

		6792 more files with the same issue

		e[33mLabelingPulseIntervale[39m
		/sub-00002130/ses-20250909/perf/sub-00002130_ses-20250909_acq-con_asl.nii.gz - Field description: Delay between the peaks of the individual labeling pulses, in milliseconds.
		/sub-00002130/ses-20250909/perf/sub-00002130_ses-20250909_acq-lab_asl.nii.gz - Field description: Delay between the peaks of the individual labeling pulses, in milliseconds.

		6792 more files with the same issue

		e[33mPCASLTypee[39m
		/sub-00002130/ses-20250909/perf/sub-00002130_ses-20250909_acq-con_asl.nii.gz - Field description: The type of gradient pulses used in the e[36mcontrole[39m condition.
		/sub-00002130/ses-20250909/perf/sub-00002130_ses-20250909_acq-lab_asl.nii.gz - Field description: The type of gradient pulses used in the e[36mcontrole[39m condition.

		6792 more files with the same issue

		e[33mTotalReadoutTimee[39m
		/sub-00002130/ses-20250909/perf/sub-00002130_ses-20250909_acq-con_asl.nii.gz - Field description: This is actually the "effective" total readout time,
defined as the readout duration, specified in seconds,
that would have generated data with the given level of distortion.
It is NOT the actual, physical duration of the readout train.
If e[36m"EffectiveEchoSpacing"e[39m has been properly computed,
it is just e[36mEffectiveEchoSpacing * (ReconMatrixPE - 1)e[39m.
		/sub-00002130/ses-20250909/perf/sub-00002130_ses-20250909_acq-lab_asl.nii.gz - Field description: This is actually the "effective" total readout time,
defined as the readout duration, specified in seconds,
that would have generated data with the given level of distortion.
It is NOT the actual, physical duration of the readout train.
If e[36m"EffectiveEchoSpacing"e[39m has been properly computed,
it is just e[36mEffectiveEchoSpacing * (ReconMatrixPE - 1)e[39m.

		6792 more files with the same issue

		e[33mCoilCombinationMethode[39m
		/sub-00002147/ses-20230308/anat/sub-00002147_ses-20230308_acq-hippocampus_T2w.nii.gz - Field description: Almost all fMRI studies using phased-array coils use root-sum-of-squares
(rSOS) combination, but other methods exist.
The image reconstruction is changed by the coil combination method
(as for the matrix coil mode above),
so anything non-standard should be reported.
		/sub-00002147/ses-20230308/anat/sub-00002147_ses-20230308_acq-QSM_echo-1_part-mag_MEGRE.nii.gz - Field description: Almost all fMRI studies using phased-array coils use root-sum-of-squares
(rSOS) combination, but other methods exist.
The image reconstruction is changed by the coil combination method
(as for the matrix coil mode above),
so anything non-standard should be reported.

		13000 more files with the same issue

		e[33mNonlinearGradientCorrectione[39m
		/sub-00002147/ses-20230308/anat/sub-00002147_ses-20230308_acq-hippocampus_T2w.nii.gz - Field description: Boolean stating if the image saved has been corrected for gradient
nonlinearities by the scanner sequence.
		/sub-00002147/ses-20230308/anat/sub-00002147_ses-20230308_acq-QSM_echo-1_part-mag_MEGRE.nii.gz - Field description: Boolean stating if the image saved has been corrected for gradient
nonlinearities by the scanner sequence.

		13000 more files with the same issue

e[36m	Please visit https://neurostars.org/search?q=SIDECAR_KEY_RECOMMENDED for existing conversations about this issue.e[39m

	e[31m[ERROR] PARTICIPANT_ID_MISMATCH Subject directories found in this dataset did not match the values in
the participant_id column found in the participants.tsv file.e[39m
		/participants.tsv

e[36m	Please visit https://neurostars.org/search?q=PARTICIPANT_ID_MISMATCH for existing conversations about this issue.e[39m

	e[31m[ERROR] SIDECAR_KEY_REQUIRED A data file's JSON sidecar is missing a key listed as required.e[39m
		e[31mUnitse[39m
		/sub-00002130/ses-20250909/anat/sub-00002130_ses-20250909_acq-QSM_echo-1_part-phase_MEGRE.nii.gz - Field description: Measurement units for the associated variable.
SI units in CMIXF formatting are RECOMMENDED
(see e[34mUnitse[39m (e[90mhttps://bids-specification.readthedocs.io/en/stable/common-principles.md#unitse[39m)).
		/sub-00002130/ses-20250909/anat/sub-00002130_ses-20250909_acq-QSM_echo-2_part-phase_MEGRE.nii.gz - Field description: Measurement units for the associated variable.
SI units in CMIXF formatting are RECOMMENDED
(see e[34mUnitse[39m (e[90mhttps://bids-specification.readthedocs.io/en/stable/common-principles.md#unitse[39m)).

		4394 more files with the same issue

		e[31mTotalAcquiredPairse[39m
		/sub-00002130/ses-20250909/perf/sub-00002130_ses-20250909_acq-con_asl.nii.gz - Field description: The total number of acquired e[36mcontrole[39m-e[36mlabele[39m pairs.
A single pair consists of a single e[36mcontrole[39m and a single e[36mlabele[39m image.
		/sub-00002130/ses-20250909/perf/sub-00002130_ses-20250909_acq-lab_asl.nii.gz - Field description: The total number of acquired e[36mcontrole[39m-e[36mlabele[39m pairs.
A single pair consists of a single e[36mcontrole[39m and a single e[36mlabele[39m image.

		6792 more files with the same issue

		e[31mIntendedFore[39m
		/sub-00002130/ses-20250909/perf/sub-00002130_ses-20250909_acq-con_m0scan.nii.gz - Field description: The paths to files for which the associated file is intended to be used.
Contains one or more e[34mBIDS URIse[39m (e[90mhttps://bids-specification.readthedocs.io/en/stable/common-principles.md#bids-urie[39m).
Using forward-slash separated paths relative to the participant subdirectory is
e[34mDEPRECATEDe[39m (e[90mhttps://bids-specification.readthedocs.io/en/stable/common-principles.md#definitionse[39m).
		/sub-00002130/ses-20250909/perf/sub-00002130_ses-20250909_acq-satTI0500_m0scan.nii.gz - Field description: The paths to files for which the associated file is intended to be used.
Contains one or more e[34mBIDS URIse[39m (e[90mhttps://bids-specification.readthedocs.io/en/stable/common-principles.md#bids-urie[39m).
Using forward-slash separated paths relative to the participant subdirectory is
e[34mDEPRECATEDe[39m (e[90mhttps://bids-specification.readthedocs.io/en/stable/common-principles.md#definitionse[39m).

		2703 more files with the same issue

e[36m	Please visit https://neurostars.org/search?q=SIDECAR_KEY_REQUIRED for existing conversations about this issue.e[39m

	e[31m[ERROR] INTENDED_FOR 'IntendedFor' field needs to point to an existing file.
Files must be subject-relative paths or BIDS URIs.e[39m
		/sub-00201004/ses-20220711/fmap/sub-00201004_ses-20220711_acq-SpinEchoFieldMapFMRI_dir-AP_epi.nii.gz
		/sub-00201004/ses-20220711/fmap/sub-00201004_ses-20220711_acq-SpinEchoFieldMapFMRI_dir-PA_epi.nii.gz

		8 more files with the same issue

e[36m	Please visit https://neurostars.org/search?q=INTENDED_FOR for existing conversations about this issue.e[39m


          e[35mSummary:e[39m                             e[35mAvailable Tasks:e[39m        e[35mAvailable Modalities:e[39m
          68521 Files, 799 GB                  rest                    MRI                  
          663 - Subjects 438 - Sessions    

Relevant log outputs (up to 20 lines):

I deleted the logs to do further testing, anyway the log indicated the presence of a phantom session (once existed, but deleted), Direct access to the .sqlite file indicated the source of trouble the logs: (ses-20250505 does not exist)


 sqlite3 /tmp/tp5b4ca394_c047_4b1d_962c_fd023c499070/20260722-111806_00284020-ec02-4ece-ada0-0dcfda0ae5f9/bids_db/layout_index.sqlite 
SQLite version 3.37.2 2022-01-06 13:25:41
Enter ".help" for usage hints.
sqlite> SELECT path
   ...> FROM files
   ...> WHERE path LIKE '%20250505%';
/data/tmp_fmripreprunlogs/sub-00282170_ses-20250505_fmriprep_2026-07-03_16-06-15.log
/data/tmp_fmripreprunlogs/sub-00282170_ses-20250505_fmriprep_2026-07-03_16-06-15_commandline.log
/data/tmp_niprepslogs/sub-00282170_ses-20250505_nipreps_2026-07-01_12-23-25.mat
/data/tmp_niprepslogs/sub-00282170_ses-20250505_nipreps_2026-07-03_16-06-15.mat
/data/tmp_posfmripreplogs/sub-00282170_ses-20250505_PostFmriprep_2025-08-07_00-08-26.log
/data/tmp_posfmripreplogs/sub-00282170_ses-20250505_PostFmriprep_2026-07-01_12-30-04.log
/data/tmp_posfmripreplogs/sub-00282170_ses-20250505_PostFmriprep_2026-07-01_12-30-04.mat
/data/tmp_posfmripreplogs/sub-00282170_ses-20250505_PostFmriprep_2026-07-03_16-10-07.log
/data/tmp_posfmripreplogs/sub-00282170_ses-20250505_PostFmriprep_2026-07-03_16-10-07.mat

Screenshots / relevant information:

Hi @Federico_G,

Given BIDS is very explicit about what can / cannot go into the BIDS root directory, I would argue that moving the logs directory would be cleaner than trying to force it into the root directory with a .bidsignore. The .bidsignoremay make sure that the logs do not mess with validation, but they may not mean the files are not indexed.

Best,

Steven

Thank you, I will then move logs into derivatives,

Still, it’s odd that the official bids validator can validate, via .bidsignore, a non-compliant dataset. Perhaps .bidsignore should be included in the standard or removed from the validator.

Best regards, Federico