fMRIPrep: dataset_description.json missing from project root

Summary of what happened:

Hello:

I’ve decided to ditch my Mac M2 desktop because of compatibility issues. No solution to the errors and the extremely long times (>20h without FS) to never complete. I’m now working on a Linux machine running Ubuntu. Some permissions issues keep coming up. First, I have to add sudo before the command.
Second, the temporary folders it creates inside my workingFolder are locked and owned by the root rather than the user. I am trying to figure our how to make it so that whatever is created is not locked. Hopefully, also avoid having to add sudo before the code. I’m concerned it will cause issues down the line.
Also, it returns an error saying that ‘dataset_description.json’ is missing from project root. But it is in my BIDS folder.
In my BIDS folder I have

- code
- derivatives
- raw
- fsl-license
- workingFolder
dataset_description.json
participants.json
participant.tsv

Any ideas on what is causing this? I was hoping that transitioning to Linux would solve my problems but it doesn’t seem so… I would really want to use fMRIprep but will have to ditch it if I can’t promptly start analyzing my data.

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

sudo fmriprep-docker \
/home/nens/Desktop/BIDS/raw \
/home/nens/Desktop/BIDS/derivatives \
participant --participant-label sub-007 \
 --fs-license-file /home/nens/Desktop/BIDS/fsl_license/license.txt \
--skip-bids-validation \
--dummy-scans 1 \
--output-spaces MNI152NLin2009cAsym:res-2 \
-w /home/nens/Desktop/BIDS/workingFolder

Version:

fmriprep:23.2.1

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

Docker on Ubuntu

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

PASTE VALIDATOR OUTPUT HERE

Relevant log outputs (up to 20 lines):

Terminal output (no log file saved)
RUNNING: docker run --rm -e DOCKER_VERSION_8395080871=24.0.5 -it -v /home/nens/Desktop/BIDS/fsl_license/license.txt:/opt/freesurfer/license.txt:ro -v /home/nens/Desktop/BIDS/raw:/data:ro -v /home/nens/Desktop/BIDS/derivatives:/out -v /home/nens/Desktop/BIDS/workingFolder:/scratch nipreps/fmriprep:23.2.1 /data /out participant --participant-label sub-007 --skip-bids-validation --dummy-scans 1 -w /scratch --output-spaces MNI152NLin2009cAsym:res-2
Traceback (most recent call last):
  File "/opt/conda/envs/fmriprep/bin/fmriprep", line 8, in <module>
    sys.exit(main())
  File "/opt/conda/envs/fmriprep/lib/python3.10/site-packages/fmriprep/cli/run.py", line 40, in main
    parse_args()
  File "/opt/conda/envs/fmriprep/lib/python3.10/site-packages/fmriprep/cli/parser.py", line 802, in parse_args
    config.from_dict({})
  File "/opt/conda/envs/fmriprep/lib/python3.10/site-packages/fmriprep/config.py", line 691, in from_dict
    execution.load(settings, init=initialize('execution'), ignore=ignore)
  File "/opt/conda/envs/fmriprep/lib/python3.10/site-packages/fmriprep/config.py", line 235, in load
    cls.init()
  File "/opt/conda/envs/fmriprep/lib/python3.10/site-packages/fmriprep/config.py", line 485, in init
    cls._layout = BIDSLayout(
  File "/opt/conda/envs/fmriprep/lib/python3.10/site-packages/bids/layout/layout.py", line 135, in __init__
    root, description = validate_root(root, validate)
  File "/opt/conda/envs/fmriprep/lib/python3.10/site-packages/bids/layout/validation.py", line 75, in validate_root
    raise BIDSValidationError(
bids.exceptions.BIDSValidationError: 'dataset_description.json' is missing from project root. Every valid BIDS dataset must have this file.

Screenshots / relevant information:

Screenshot from 2024-03-29 15-49-41


Hi @ilaria,

Your data do not appear to be organized in a BIDS valid matter yet.

  1. I suggest putting your work folder outside your BIDS root
  2. fsl-license is not a valid folder for the root directory. Try putting it in code
  3. raw is not a BIDS valid folder. All raw data should be in subject specific in the main BIDS root directory.

Your first fmriprep argument should be to the main BIDS root directory, where the dataset description json is.

Not skipping BIDS validation is recommended as errors like this would be caught by the validator. If you need guidance on BIDS organization you can check out the BIDS starter kit, BIDS examples, and the specification itself.

Best,
Steven

Thanks. I found the error and moved the dataset file to the correct location plus IT helped with the permissions on the computer.
IT suggested to add local user to the dockers group and dockers/fmriprep to user group then changed all permissions within the working folder to 775.
Now its running, fingers crossed it completes!

thanks!

Hi @ilaria,

Great! I also like to add umask 002 towards the beginning of my scripts, which makes all outputs read/writeable to group members, as opposed to someone needing to change permissions after the fact.

Best,
Steven

that’s useful. I will try! thanks