Fmriprep BIDS root does not exist

I had previously been running fmriprep with the skip-bids-validation tag.

While attempting to address this issue:

https://neurostars.org/t/fmriprep-reports-only-contain-methods-description

I removed the tag so that my command now reads:

fmriprep \
    ${data_folder} ${postprocessed_folder}  \
    participant \
    -w ${working_folder} \
    --participant-label ${file} \
    --task-id rest \
    --fs-license-file ${HOME}/license.txt \
    --use-syn-sdc \
    --cifti-output \
    --output-spaces MNI152NLin2009cAsym MNI152NLin6Asym fsaverage5 fsnative fsLR T1w\
    --ignore fieldmaps\
    --nthreads 4 \
    --omp-nthreads 4 \
    --mem_mb 30000 \
    --reports-only

I then receive the error:

ValueError: BIDS root does not exist: /data/project/strata/results/func/processed/fmriprep/sub-SRK04

I can’t work out why it is looking for

results/func/processed/fmriprep/sub-SRK04

as opposed to the correct location:

results/func/processed/sub-SRK04

Any thoughts?

Thanks!

rob

Hi, to assess this, we would need to know your full command (including, more-or-less, the values of the variables), fmriprep version, the listing of the input directory, and the full traceback.

Thanks

Version is 21.0.1

The command is

#!/bin/tcsh

#$ -m n
#$ -o /data/project/strata/code/logs/fmriprep_o$TASK_ID
#$ -e /data/project/strata/code/logs/fmriprep_e$TASK_ID
#$ -q global
#$ -N fmriprep
#$ -l h_vmem=10G
#$ -pe smp 4

setenv SGE_CLEAN 1
module purge
module load nan sge
module load fmriprep/21.0.1

set data_folder='/data/project/strata/BIDS_data/'
set postprocessed_folder='/data/project/strata/results/func/processed'
set list='/data/project/strata/code/subjects.list'
set working_folder='/data/project/strata/results/func/working'
set file="`awk 'FNR==$SGE_TASK_ID' ${list}`"

fmriprep \
    ${data_folder} ${postprocessed_folder}  \
    participant \
    -w ${working_folder} \
    --participant-label ${file} \
    --task-id rest \
    --fs-license-file ${HOME}/license.txt \
    --use-syn-sdc \
    --cifti-output \
    --output-spaces MNI152NLin2009cAsym MNI152NLin6Asym fsaverage5 fsnative fsLR T1w\
    --ignore fieldmaps\
    --nthreads 4 \
    --omp-nthreads 4 \
    --mem_mb 30000 \
    --reports-only

The directory structure of the input data is e.g.:

/data/project/strata/BIDS_data/sub-SRK22/ses-A/anat:
sub-SRK22_ses-A_T1w.json  sub-SRK22_ses-A_T1w.nii.gz

/data/project/strata/BIDS_data/sub-SRK22/ses-A/func:
sub-SRK22_ses-A_task-rest_run-1_bold.json  sub-SRK22_ses-A_task-rest_run-1_bold.nii.gz

The full error message is

WARNING: underlay of /etc/localtime required more than 50 (107) bind mounts
Process Process-2:
Traceback (most recent call last):
  File "/opt/conda/lib/python3.8/multiprocessing/process.py", line 315, in _bootstrap
    self.run()
  File "/opt/conda/lib/python3.8/multiprocessing/process.py", line 108, in run
    self._target(*self._args, **self._kwargs)
  File "/opt/conda/lib/python3.8/site-packages/fmriprep/cli/workflow.py", line 88, in build_workflow
    retval["return_code"] = generate_reports(
  File "/opt/conda/lib/python3.8/site-packages/niworkflows/reports/core.py", line 544, in generate_reports
    report_errors = [
  File "/opt/conda/lib/python3.8/site-packages/niworkflows/reports/core.py", line 545, in <listcomp>
    run_reports(
  File "/opt/conda/lib/python3.8/site-packages/niworkflows/reports/core.py", line 527, in run_reports
    return Report(
  File "/opt/conda/lib/python3.8/site-packages/niworkflows/reports/core.py", line 291, in __init__
    self._load_config(Path(config or pkgrf("niworkflows", "reports/default.yml")))
  File "/opt/conda/lib/python3.8/site-packages/niworkflows/reports/core.py", line 310, in _load_config
    self.index(settings["sections"])
  File "/opt/conda/lib/python3.8/site-packages/niworkflows/reports/core.py", line 322, in index
    self.init_layout()
  File "/opt/conda/lib/python3.8/site-packages/niworkflows/reports/core.py", line 313, in init_layout
    self.layout = BIDSLayout(self.root, config="figures", validate=False)
  File "/opt/conda/lib/python3.8/site-packages/bids/layout/layout.py", line 126, in __init__
    root, description = validate_root(root, validate)
  File "/opt/conda/lib/python3.8/site-packages/bids/layout/validation.py", line 68, in validate_root
    raise ValueError("BIDS root does not exist: %s" % root)
ValueError: BIDS root does not exist: /data/project/strata/results/func/processed/fmriprep/sub-SRK03