BIDS validation- File Path: Files with such naming scheme are not part of BIDS specification

Hello,

After running frmriprep on one subject in my local pc I faced this error;
raise BIDSValidationError(
bids.exceptions.BIDSValidationError: ‘dataset_description.json’ is missing from project root. Every valid BIDS dataset must have this file.
Example contents of ‘dataset_description.json’:
{“Name”: “Example dataset”, “BIDSVersion”: “1.0.2”}
according to search on fmriprep developer communities I find a json file
therefore I ran the code again
but I faced this error after 4:30 from the start of running the code;
Preprocessing did not finish successfully. Errors occurred while processing data from participants.

After that I did BIDS validation
I faced many errors like these;

Type: Error
File: sub-mp0001_ses-01_run-02_bold.nii.gz
Location: sub-mp0001/ses-01/func/sub-mp0001_ses-01_run-02_bold.nii.gz
Reason: Session label in the filename doesn’t match with the path of the file. File seems to be saved in incorrect session directory.
Evidence: File: /ses-01/func/sub-mp0001_ses-01_run-02_bold.nii.gz is saved in incorrect session directory as per ses-id in filename.

File Path: The recommended file /README is missing. See Section 03 (Modality agnostic files) of the BIDS specification.

Type: Warning

.
.
.

Is there any possibility to tell me how can I fix this BIDS validation error?

I’m trying to learn working with fmriprep and I dont know how much my question is travial.

I’m really appreciative of your time and consideration.
Best,

Hello,

Can you add a task-<taskname> label to your bold files? You can see more about required parts of the file name here: Magnetic Resonance Imaging - Brain Imaging Data Structure v1.7.0

You can read more about the README file (and other dataset descriptors) here: Modality agnostic files - Brain Imaging Data Structure v1.7.0

Best,
Steven

Sure, thank you so much
I’ll do that
Best, Roya

Hello again,
after trying to fix the BIDS error,
I run the frmriprep code again, it gave me a HTML file in my output, which included these errors;

Errors

Node Name: fmriprep_22_0_wf.single_subject_1001_wf.func_preproc_ses_01_run_02_wf.bold_confounds_wf.ds_report_bold_rois

File: /out/sub-1001/log/20220829-193930_097a8f1d-4ae7-41f2-af36-ecca0b81e0e7/crash-20220829-220819-root-ds_report_bold_rois-d3466219-a07c-40a9-9760-5cfbc10ad8f2.txt
Working Directory: /tmp/work/fmriprep_22_0_wf/single_subject_1001_wf/func_preproc_ses_01_run_02_wf/bold_confounds_wf/ds_report_bold_rois
Inputs:

  • acquisition: ``
  • atlas: ``
  • base_directory: /out
  • ceagent: ``
  • check_hdr: True
  • cohort: ``
  • compress: ``
  • data_dtype: ``
  • datatype: figures
  • density: ``
  • desc: rois
  • direction: ``
  • dismiss_entities: ['echo']
  • echo: ``
  • extension: ``
  • flip: ``
  • fmap: ``
  • fmapid: ``
  • from: ``
  • hemi: ``
  • in_file: ['/tmp/work/fmriprep_22_0_wf/single_subject_1001_wf/func_preproc_ses_01_run_02_wf/bold_confounds_wf/rois_plot/report.svg']
  • inv: ``
  • label: ``
  • meta_dict: ``
  • modality: ``
  • mode: ``
  • model: ``
  • mt: ``
  • part: ``
  • proc: ``
  • reconstruction: ``
  • recording: ``
  • resolution: ``
  • roi: ``
  • run: ``
  • scans: ``
  • session: ``
  • source_file: ['/data/sub-1001/ses-01/func/sub-1001_ses-01_run-02_bold.nii.gz']
  • space: ``
  • subject: ``
  • subset: ``
  • suffix: ``
  • task: ``
  • to: ``

Traceback (most recent call last): File “/opt/conda/lib/python3.9/site-packages/nipype/pipeline/plugins/multiproc.py”, line 344, in _send_procs_to_workers self.procs[jobid].run(updatehash=updatehash) File “/opt/conda/lib/python3.9/site-packages/nipype/pipeline/engine/nodes.py”, line 524, in run result = self._run_interface(execute=True) File “/opt/conda/lib/python3.9/site-packages/nipype/pipeline/engine/nodes.py”, line 642, in _run_interface return self._run_command(execute) File “/opt/conda/lib/python3.9/site-packages/nipype/pipeline/engine/nodes.py”, line 750, in _run_command raise NodeExecutionError( nipype.pipeline.engine.nodes.NodeExecutionError: Exception raised while executing Node ds_report_bold_rois. Traceback (most recent call last): File “/opt/conda/lib/python3.9/site-packages/nipype/interfaces/base/core.py”, line 398, in run runtime = self._run_interface(runtime) File “/opt/conda/lib/python3.9/site-packages/niworkflows/interfaces/bids.py”, line 600, in _run_interface raise ValueError(f"Could not build path with entities {out_entities}.") ValueError: Could not build path with entities {‘subject’: ‘1001’, ‘session’: ‘01’, ‘run’: 02, ‘suffix’: ‘bold’, ‘datatype’: ‘figures’, ‘extension’: ‘svg’, ‘desc’: ‘rois’}

Node Name: fmriprep_22_0_wf.single_subject_1001_wf.func_preproc_ses_01_run_02_wf.func_derivatives_wf.ds_confounds

File: /out/sub-1001/log/20220829-193930_097a8f1d-4ae7-41f2-af36-ecca0b81e0e7/crash-20220829-220817-root-ds_confounds-c682350b-8eea-4ef9-9507-83fb1ae21637.txt
Working Directory: /tmp/work/fmriprep_22_0_wf/single_subject_1001_wf/func_preproc_ses_01_run_02_wf/func_derivatives_wf/ds_confounds
Inputs:

  • acquisition: ``
  • atlas: ``
  • base_directory: /out
  • ceagent: ``
  • check_hdr: True
  • cohort: ``
  • compress: ``
  • data_dtype: ``
  • datatype: ``
  • density: ``
  • desc: confounds
  • direction: ``
  • dismiss_entities: ['echo']
  • echo: ``
  • extension: ``
  • flip: ``
  • fmap: ``
  • fmapid: ``
  • from: ``
  • hemi: ``
  • in_file: ['/tmp/work/fmriprep_22_0_wf/single_subject_1001_wf/func_preproc_ses_01_run_02_wf/bold_confounds_wf/spike_regressors/confounds_expansion_desc-motion_outliers.tsv']
  • inv: ``
  • label: ``
  • meta_dict: {'t_comp_cor_00': {'SingularValue': 291.7825939455, 'VarianceExplained': 0.1754159568, 'CumulativeVarianceExplained': 0.1754159568, 'Retained': True, 'Method': 'tCompCor'}, 't_comp_cor_01': {'SingularValue': 274.6935014098, 'VarianceExplained': 0.1554701814, 'CumulativeVarianceExplained': 0.3308861382, 'Retained': True, 'Method': 'tCompCor'}, 't_comp_cor_02': {'SingularValue': 232.5039079997, 'VarianceExplained': 0.1113809324, 'CumulativeVarianceExplained': 0.4422670705, 'Retained': True, 'Method': 'tCompCor'}, 't_comp_cor_03': {'SingularValue': 173.3276511893, 'VarianceExplained': 0.0618993429, 'CumulativeVarianceExplained': 0.5041664134, 'Retained': True, 'Method': 'tCompCor'}, 'c_comp_cor_00': {'Mask': 'CSF', 'SingularValue': 107.1578778663, 'VarianceExplained': 0.0629102039, 'CumulativeVarianceExplained': 0.0629102039, 'Retained': True, 'Method': 'aCompCor'}, 'c_comp_cor_01': {'Mask': 'CSF', 'SingularValue': 70.6327562378, 'VarianceExplained': 0.0273328672, 'CumulativeVarianceExplained': 0.0902430711, 'Retained': True, 'Method': 'aCompCor'}, 'c_comp_cor_02': {'Mask': 'CSF', 'SingularValue': 65.8761664853, 'VarianceExplained': 0.0237754925, 'CumulativeVarianceExplained': 0.1140185636, 'Retained': True, 'Method': 'aCompCor'}, 'c_comp_cor_03': {'Mask': 'CSF', 'SingularValue': 60.9546543002, 'VarianceExplained': 0.0203557275, 'CumulativeVarianceExplained': 0.1343742911, 'Retained': True, 'Method': 'aCompCor'}, 'c_comp_cor_04': {'Mask': 'CSF', 'SingularValue': 55.0257963006, 'VarianceExplained': 0.0165884404, 'CumulativeVarianceExplained': 0.1509627315, 'Retained': True, 'Method': 'aCompCor'}, 'c_comp_cor_05': {'Mask': 'CSF', 'SingularValue': 45.4278802408, 'VarianceExplained': 0.0113062303, 'CumulativeVarianceExplained': 0.1622689618, 'Retained': True, 'Method': 'aCompCor'}, 'c_comp_cor_06': {'Mask': 'CSF', 'SingularValue': 43.9461919014, 'VarianceExplained': 0.0105807239, 'CumulativeVarianceExplained': 0.1728496857, 'Retained': True, 'Method': 'aCompCor'}, 'c_comp_cor_07': {'Mask': 'CSF', 'SingularValue': 42.489792554, 'VarianceExplained': 0.0098910434, 'CumulativeVarianceExplained': 0.182740729, 'Retained': True, 'Method': 'aCompCor'}, 'c_comp_cor_08': {'Mask': 'CSF', 'SingularValue': 41.8307676372, 'VarianceExplained': 0.0095865988,
    .
    .
    .
    .

Node Name: fmriprep_22_0_wf.single_subject_1001_wf.func_preproc_ses_01_run_01_wf.func_derivatives_wf.ds_ref_t1w_xfm
Node Name: fmriprep_22_0_wf.single_subject_1001_wf.func_preproc_ses_01_run_01_wf.bold_confounds_wf.ds_report_compcor
Node Name: fmriprep_22_0_wf.single_subject_1001_wf.func_preproc_ses_01_run_01_wf.func_derivatives_wf.ds_bold_std_ref
Node Name: fmriprep_22_0_wf.single_subject_1001_wf.func_preproc_ses_01_run_02_wf.func_derivatives_wf.ds_bold_mask_std
Node Name: fmriprep_22_0_wf.single_subject_1001_wf.func_preproc_ses_01_run_01_wf.bold_confounds_wf.ds_report_bold_rois
Node Name: fmriprep_22_0_wf.single_subject_1001_wf.func_preproc_ses_01_run_01_wf.func_derivatives_wf.ds_bold_aparc_std
Node Name: fmriprep_22_0_wf.single_subject_1001_wf.func_preproc_ses_01_run_01_wf.ds_report_validation
Node Name: fmriprep_22_0_wf.single_subject_1001_wf.func_preproc_ses_01_run_01_wf.carpetplot_wf.ds_report_bold_conf
Node Name: fmriprep_22_0_wf.single_subject_1001_wf.func_preproc_ses_01_run_01_wf.func_derivatives_wf.ds_bold_aseg_std
Node Name: fmriprep_22_0_wf.single_subject_1001_wf.func_preproc_ses_01_run_01_wf.func_derivatives_wf.ds_bold_mask_std
Node Name: fmriprep_22_0_wf.single_subject_1001_wf.func_preproc_ses_01_run_02_wf.ds_report_summary
Node Name: fmriprep_22_0_wf.single_subject_1001_wf.func_preproc_ses_01_run_02_wf.bold_reg_wf.ds_report_reg
Node Name: fmriprep_22_0_wf.single_subject_1001_wf.func_preproc_ses_01_run_01_wf.bold_confounds_wf.ds_report_conf_corr
Node Name: fmriprep_22_0_wf.single_subject_1001_wf.func_preproc_ses_01_run_02_wf.func_derivatives_wf.ds_t1w_tpl_inv_xfm
Node Name: fmriprep_22_0_wf.single_subject_1001_wf.func_preproc_ses_01_run_01_wf.func_derivatives_wf.ds_confounds
Node Name: fmriprep_22_0_wf.single_subject_1001_wf.summary
Node Name: fmriprep_22_0_wf.single_subject_1001_wf.func_preproc_ses_01_run_01_wf.func_derivatives_wf.ds_t1w_tpl_inv_xfm
Node Name: fmriprep_22_0_wf.single_subject_1001_wf.func_preproc_ses_01_run_01_wf.func_derivatives_wf.ds_bold_std
Node Name: fmriprep_22_0_wf.single_subject_1001_wf.func_preproc_ses_01_run_02_wf.ds_report_validation
Node Name: fmriprep_22_0_wf.single_subject_1001_wf.func_preproc_ses_01_run_01_wf.bold_reg_wf.ds_report_reg
Node Name: fmriprep_22_0_wf.single_subject_1001_wf.func_preproc_ses_01_run_02_wf.func_derivatives_wf.ds_bold_std_ref
Node Name: fmriprep_22_0_wf.single_subject_1001_wf.func_preproc_ses_01_run_02_wf.func_derivatives_wf.ds_ref_t1w_xfm
Node Name: fmriprep_22_0_wf.single_subject_1001_wf.func_preproc_ses_01_run_02_wf.bold_confounds_wf.ds_report_conf_corr
Node Name: fmriprep_22_0_wf.single_subject_1001_wf.func_preproc_ses_01_run_02_wf.func_derivatives_wf.ds_bold_std
Node Name: fmriprep_22_0_wf.single_subject_1001_wf.func_preproc_ses_01_run_02_wf.func_derivatives_wf.ds_bold_aseg_std
Node Name: fmriprep_22_0_wf.single_subject_1001_wf.func_preproc_ses_01_run_02_wf.bold_confounds_wf.ds_report_compcor
Node Name: fmriprep_22_0_wf.single_subject_1001_wf.func_preproc_ses_01_run_02_wf.func_derivatives_wf.ds_bold_aparc_std
Node Name: fmriprep_22_0_wf.single_subject_1001_wf.func_preproc_ses_01_run_01_wf.ds_report_summary
Node Name: fmriprep_22_0_wf.single_subject_1001_wf.func_preproc_ses_01_run_02_wf.carpetplot_wf.ds_report_bold_conf

Could you please tell me what could be the reason for these errors?

Best, Roqa

Can you please provide:

  1. The new BIDS validator output
  2. The command you used to run fMRIPrep
  3. The file structure for a single subject (e.g., using the tree command on the subject directory)

sure, Thank you

1- File Path: Files with such naming scheme are not part of BIDS specification. This error is most commonly caused by typos in file names that make them not BIDS compatible. Please consult the specification and make sure your files are named correctly. If this is not a file naming issue (for example when including files not yet covered by the BIDS specification) you should include a “.bidsignore” file in your dataset (see GitHub - bids-standard/bids-validator: Validator for the Brain Imaging Data Structure for details). Please note that derived (processed) data should be placed in /derivatives folder and source data (such as DICOMS or behavioural logs in proprietary formats) should be placed in the /sourcedata folder.

Type:		Error
File:		sub-1001_ses-01_acq-3D_flair.json
Location:		new1/sub-1001/ses-01/anat/sub-1001_ses-01_acq-3D_flair.json
Reason:		Files with such naming scheme are not part of BIDS specification. This error is most commonly caused by typos in file names that make them not BIDS compatible. Please consult the specification and make sure your files are named correctly. If this is not a file naming issue (for example when including files not yet covered by the BIDS specification) you should include a ".bidsignore" file in your dataset (see https://github.com/bids-standard/bids-validator#bidsignore for details). Please note that derived (processed) data should be placed in /derivatives folder and source data (such as DICOMS or behavioural logs in proprietary formats) should be placed in the /sourcedata folder.
Evidence:	sub-1001_ses-01_acq-3D_flair.json

Type:		Error
File:		sub-1001_ses-01_acq-3D_flair.nii.gz
Location:		new1/sub-1001/ses-01/anat/sub-1001_ses-01_acq-3D_flair.nii.gz
Reason:		Files with such naming scheme are not part of BIDS specification. This error is most commonly caused by typos in file names that make them not BIDS compatible. Please consult the specification and make sure your files are named correctly. If this is not a file naming issue (for example when including files not yet covered by the BIDS specification) you should include a ".bidsignore" file in your dataset (see https://github.com/bids-standard/bids-validator#bidsignore for details). Please note that derived (processed) data should be placed in /derivatives folder and source data (such as DICOMS or behavioural logs in proprietary formats) should be placed in the /sourcedata folder.
Evidence:	sub-1001_ses-01_acq-3D_flair.nii.gz

Type:		Error
File:		sub-1001_ses-01_run-01_epi.json
Location:		new1/sub-1001/ses-01/fmap/sub-1001_ses-01_run-01_epi.json
Reason:		Files with such naming scheme are not part of BIDS specification. This error is most commonly caused by typos in file names that make them not BIDS compatible. Please consult the specification and make sure your files are named correctly. If this is not a file naming issue (for example when including files not yet covered by the BIDS specification) you should include a ".bidsignore" file in your dataset (see https://github.com/bids-standard/bids-validator#bidsignore for details). Please note that derived (processed) data should be placed in /derivatives folder and source data (such as DICOMS or behavioural logs in proprietary formats) should be placed in the /sourcedata folder.
Evidence:	sub-1001_ses-01_run-01_epi.json

Type:		Error
File:		sub-1001_ses-01_run-01_epi.nii.gz
Location:		new1/sub-1001/ses-01/fmap/sub-1001_ses-01_run-01_epi.nii.gz
Reason:		Files with such naming scheme are not part of BIDS specification. This error is most commonly caused by typos in file names that make them not BIDS compatible. Please consult the specification and make sure your files are named correctly. If this is not a file naming issue (for example when including files not yet covered by the BIDS specification) you should include a ".bidsignore" file in your dataset (see https://github.com/bids-standard/bids-validator#bidsignore for details). Please note that derived (processed) data should be placed in /derivatives folder and source data (such as DICOMS or behavioural logs in proprietary formats) should be placed in the /sourcedata folder.
Evidence:	sub-1001_ses-01_run-01_epi.nii.gz

Type:		Error
File:		sub-1001_ses-01_run-02_epi.json
Location:		new1/sub-1001/ses-01/fmap/sub-1001_ses-01_run-02_epi.json
Reason:		Files with such naming scheme are not part of BIDS specification. This error is most commonly caused by typos in file names that make them not BIDS compatible. Please consult the specification and make sure your files are named correctly. If this is not a file naming issue (for example when including files not yet covered by the BIDS specification) you should include a ".bidsignore" file in your dataset (see https://github.com/bids-standard/bids-validator#bidsignore for details). Please note that derived (processed) data should be placed in /derivatives folder and source data (such as DICOMS or behavioural logs in proprietary formats) should be placed in the /sourcedata folder.
Evidence:	sub-1001_ses-01_run-02_epi.json

Type:		Error
File:		sub-1001_ses-01_run-02_epi.nii.gz
Location:		new1/sub-1001/ses-01/fmap/sub-1001_ses-01_run-02_epi.nii.gz
Reason:		Files with such naming scheme are not part of BIDS specification. This error is most commonly caused by typos in file names that make them not BIDS compatible. Please consult the specification and make sure your files are named correctly. If this is not a file naming issue (for example when including files not yet covered by the BIDS specification) you should include a ".bidsignore" file in your dataset (see https://github.com/bids-standard/bids-validator#bidsignore for details). Please note that derived (processed) data should be placed in /derivatives folder and source data (such as DICOMS or behavioural logs in proprietary formats) should be placed in the /sourcedata folder.
Evidence:	sub-1001_ses-01_run-02_epi.nii.gz

Type:		Error
File:		sub-1001_ses-01_run-03_epi.json
Location:		new1/sub-1001/ses-01/fmap/sub-1001_ses-01_run-03_epi.json
Reason:		Files with such naming scheme are not part of BIDS specification. This error is most commonly caused by typos in file names that make them not BIDS compatible. Please consult the specification and make sure your files are named correctly. If this is not a file naming issue (for example when including files not yet covered by the BIDS specification) you should include a ".bidsignore" file in your dataset (see https://github.com/bids-standard/bids-validator#bidsignore for details). Please note that derived (processed) data should be placed in /derivatives folder and source data (such as DICOMS or behavioural logs in proprietary formats) should be placed in the /sourcedata folder.
Evidence:	sub-1001_ses-01_run-03_epi.json

Type:		Error
File:		sub-1001_ses-01_run-03_epi.nii.gz
Location:		new1/sub-1001/ses-01/fmap/sub-1001_ses-01_run-03_epi.nii.gz
Reason:		Files with such naming scheme are not part of BIDS specification. This error is most commonly caused by typos in file names that make them not BIDS compatible. Please consult the specification and make sure your files are named correctly. If this is not a file naming issue (for example when including files not yet covered by the BIDS specification) you should include a ".bidsignore" file in your dataset (see https://github.com/bids-standard/bids-validator#bidsignore for details). Please note that derived (processed) data should be placed in /derivatives folder and source data (such as DICOMS or behavioural logs in proprietary formats) should be placed in the /sourcedata folder.
Evidence:	sub-1001_ses-01_run-03_epi.nii.gz

Type:		Error
File:		sub-1001_ses-01_run-01_bold.json
Location:		new1/sub-1001/ses-01/func/sub-1001_ses-01_run-01_bold.json
Reason:		Files with such naming scheme are not part of BIDS specification. This error is most commonly caused by typos in file names that make them not BIDS compatible. Please consult the specification and make sure your files are named correctly. If this is not a file naming issue (for example when including files not yet covered by the BIDS specification) you should include a ".bidsignore" file in your dataset (see https://github.com/bids-standard/bids-validator#bidsignore for details). Please note that derived (processed) data should be placed in /derivatives folder and source data (such as DICOMS or behavioural logs in proprietary formats) should be placed in the /sourcedata folder.
Evidence:	sub-1001_ses-01_run-01_bold.json

Type:		Error
File:		sub-1001_ses-01_run-01_bold.nii.gz
Location:		new1/sub-1001/ses-01/func/sub-1001_ses-01_run-01_bold.nii.gz
Reason:		Files with such naming scheme are not part of BIDS specification. This error is most commonly caused by typos in file names that make them not BIDS compatible. Please consult the specification and make sure your files are named correctly. If this is not a file naming issue (for example when including files not yet covered by the BIDS specification) you should include a ".bidsignore" file in your dataset (see https://github.com/bids-standard/bids-validator#bidsignore for details). Please note that derived (processed) data should be placed in /derivatives folder and source data (such as DICOMS or behavioural logs in proprietary formats) should be placed in the /sourcedata folder.
Evidence:	sub-1001_ses-01_run-01_bold.nii.gz

Type:		Error
File:		sub-1001_ses-01_run-02_bold.json
Location:		new1/sub-1001/ses-01/func/sub-1001_ses-01_run-02_bold.json
Reason:		Files with such naming scheme are not part of BIDS specification. This error is most commonly caused by typos in file names that make them not BIDS compatible. Please consult the specification and make sure your files are named correctly. If this is not a file naming issue (for example when including files not yet covered by the BIDS specification) you should include a ".bidsignore" file in your dataset (see https://github.com/bids-standard/bids-validator#bidsignore for details). Please note that derived (processed) data should be placed in /derivatives folder and source data (such as DICOMS or behavioural logs in proprietary formats) should be placed in the /sourcedata folder.
Evidence:	sub-1001_ses-01_run-02_bold.json

Type:		Error
File:		sub-1001_ses-01_run-02_bold.nii.gz
Location:		new1/sub-1001/ses-01/func/sub-1001_ses-01_run-02_bold.nii.gz
Reason:		Files with such naming scheme are not part of BIDS specification. This error is most commonly caused by typos in file names that make them not BIDS compatible. Please consult the specification and make sure your files are named correctly. If this is not a file naming issue (for example when including files not yet covered by the BIDS specification) you should include a ".bidsignore" file in your dataset (see https://github.com/bids-standard/bids-validator#bidsignore for details). Please note that derived (processed) data should be placed in /derivatives folder and source data (such as DICOMS or behavioural logs in proprietary formats) should be placed in the /sourcedata folder.
Evidence:	sub-1001_ses-01_run-02_bold.nii.gz

======================================================

File Path: The recommended file /README is missing. See Section 03 (Modality agnostic files) of the BIDS specification.

Type:		Warning

======================================================

2- That’s the fmriprep cmd that I used.

docker run -ti --rm -v $HOME/new1:/data:ro -v $HOME/output7:/out -v $HOME/freesurfer/license.txt:/opt/freesurfer/license.txt nipreps/fmriprep:latest /data /out participant --participant_label 1001 --skip-bids-validation

3- file structure for 2 subject ( I separated 2 subjects and put them in a foleder-new1)

new1
├── dataset_description.json
└── sub-1001
└── ses-01
├── anat
│ ├── sub-1001_ses-01_acq-3D_flair.json
│ ├── sub-1001_ses-01_acq-3D_flair.nii.gz
│ ├── sub-1001_ses-01_T1w.json
│ └── sub-1001_ses-01_T1w.nii.gz
├── fmap
│ ├── sub-1001_ses-01_run-01_epi.json
│ ├── sub-1001_ses-01_run-01_epi.nii.gz
│ ├── sub-1001_ses-01_run-02_epi.json
│ ├── sub-1001_ses-01_run-02_epi.nii.gz
│ ├── sub-1001_ses-01_run-03_epi.json
│ └── sub-1001_ses-01_run-03_epi.nii.gz
└── func
├── sub-1001_ses-01_run-01_bold.json
├── sub-1001_ses-01_run-01_bold.nii.gz
├── sub-1001_ses-01_run-02_bold.json
└── sub-1001_ses-01_run-02_bold.nii.gz

5 directories, 15 files

I’m really appreciative of your time and help.
Best

Hi,

Fmriprep command looks fine, except I would always explicitly specify a work directory with the -w argument.

In regards to the BIDS validator errors:

  1. you still need to ask the task-<task> label to the BOLD files
  2. the fmap files need a dir-<dir> label
  3. “flair” should be all capitalized
  4. you are still missing dataset descriptors such as the README file

All of these points are explained more in the BIDS specification I shared earlier: Magnetic Resonance Imaging - Brain Imaging Data Structure v1.7.0

Best,
Steven

If you still have the dicoms, it might just be best to use something like dcm2bids or heudiconv to make BIDS valid data automatically without the manual guess-and-check.

Thank you so much Steven
I will working on the data according to your guides
Thank you for your help and time.
Best, Roqa

Hello Steven,
I worked according your guides and received the confounds.
now when I wanted to acquire time series through this cmd;

… image:: …/_static/harvard_oxford.png

ts = roi.extract_timecourse_from_nii(atlas_harvard_oxford,
func,
confounds=confounds.values,
t_r=2,
high_pass=1./128,
)

I faced this errors;

ValueError Traceback (most recent call last)
/tmp/ipykernel_109702/165070437.py in
----> 1 ts = roi.extract_timecourse_from_nii(atlas_harvard_oxford,
2 func,
3 confounds=confounds.values,
4 t_r=2,
5 high_pass=1./128,

~/nideconv/nideconv/utils/roi.py in extract_timecourse_from_nii(atlas, nii, mask, confounds, atlas_type, t_r, low_pass, high_pass, *args, **kwargs)
116 *args, **kwargs)
117
→ 118 data = _make_psc(nii)
119
120 results = masker.fit_transform(data,

~/nideconv/nideconv/utils/roi.py in _make_psc(data)
267 denom = image.new_img_like(mean_img, mean_data)
268
→ 269 return image.math_img(‘data / denom[…, np.newaxis] * 100 - 100’,
270 data=data, denom=denom)
271

~/.local/lib/python3.8/site-packages/nilearn/image/image.py in math_img(formula, **imgs)
923 data_dict[‘np’] = np
924 try:
→ 925 result = eval(formula, data_dict)
926 except Exception as exc:
927 exc.args = ((“Input formula couldn’t be processed, you provided ‘{0}’,”

in

ValueError: (“Input formula couldn’t be processed, you provided ‘data / denom[…, np.newaxis] * 100 - 100’,”, 'operands could not be broadcast together with shapes (65,77,65) (65,77,65,1) ')

Could you please guide me interms of fixing this error too.

I am thankful of your help and appreciate your time and consideration.

Best, Roqa

Hi,

Unless the is due to BIDS validation errors, this sounds like a different issue which should go on a new post.

Are you still receiving BIDS validation errors?
Does fmriprep start successfully? It’s not clear if what you posted is a sub process of fmriprep or not.

Best,
Steven

Thank you Steven.
Sure, I will open a new issue.
But as answer your question, yes fmriprep start successfully and give me an HTML file without any error.
that is the next step that I used the output of fmriprep for obtaining time series.

Best regards,
Roqa