Ah okay thank you I will try that now!
The output:
pip install --upgrade fmriprep-docker # Or pick a specific version with fmriprep==23.1.4 for example
fmriprep-docker $HOME/Desktop/Flanker \
$HOME/Desktop/Flanker/derivatives/fmriprep participant \
--participant-label 08 \
--output-spaces MNI152NLin2009cAsym:res-2 \
--nthreads=4 --mem-mb 20000
Defaulting to user installation because normal site-packages is not writeable
Requirement already satisfied: fmriprep-docker in ./.local/lib/python3.10/site-packages (23.1.4)
Warning: <8GB of RAM is available within your Docker environment.
Some parts of fMRIPrep may fail to complete.
Continue anyway? [y/N]y
RUNNING: docker run --rm -e DOCKER_VERSION_8395080871=24.0.6 -it -v /home/clara/Desktop/Flanker:/data:ro -v /home/clara/Desktop/Flanker/derivatives/fmriprep:/out nipreps/fmriprep:23.1.4 /data /out participant --participant-label 08 --nthreads=4 --mem-mb 20000 --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 43, in main
parse_args()
File "/opt/conda/envs/fmriprep/lib/python3.10/site-packages/fmriprep/cli/parser.py", line 786, in parse_args
config.from_dict({})
File "/opt/conda/envs/fmriprep/lib/python3.10/site-packages/fmriprep/config.py", line 678, 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 232, in load
cls.init()
File "/opt/conda/envs/fmriprep/lib/python3.10/site-packages/fmriprep/config.py", line 476, 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.
Example contents of 'dataset_description.json':
{"Name": "Example dataset", "BIDSVersion": "1.0.2"}
fMRIPrep: Please report errors to https://github.com/nipreps/fmriprep/issues
However I know I have a dataset_description.json file as it is here
The first argument for fmriprep is supposed to be your BIDS dataset where all the subject data are (as well as your dataset_description.json). Where is that?
What do you mean by ‘pass in’? I copied the path from my files folder so that is probably why it is in Windows naming convention. I run all of my commands through Ubuntu.
Thank you! If you see in the picture, there’s an option that says, ‘Copy as path’. When I select this option, it gives me the path in the windows format as I am using a Windows 11 Pro laptop. I mean that in my Windows terminal I installed Ubuntu and I use it to run my programs.
Okay, so the problem is that your dataset is at \Users\clara\Desktop\Flanker, but you tell Docker that it is at /home/clara/Desktop/Flanker (same as $HOME/Desktop/Flanker). You should find where your BIDS dataset is in Ubuntu notation, and use that as your input for fMRIPrep.
Doesn’t seem like it, as you already tried that, right? I don’t use Windows, and do not know the particulars of how you set up Ubuntu within your Windows system. Can you run a test and match any directory between the two systems and then extrapolate those naming conventions?
Alternatively, you can just run everything on Windows, by installing the Windows Subsystem for Linux (wsl), which allows you to use bash/Ubuntu syntax on Windows.
I do have wsl installed.
Just in case, I ran the script
#!/bin/bash
# Template provided by Daniel Levitas of Indiana University
# Edits by Andrew Jahn, University of Michigan, 07.22.2020
# User inputs:
bids_root_dir=/home/clara/Desktop/Flanker
work_dir="/tmp" # Set to /tmp for the temporary directory
subj=08
nthreads=4
mem=20 # gb
container="docker" # docker or singularity
# Begin:
# Convert virtual memory from gb to mb
mem=`echo "${mem//[!0-9]/}"` # remove gb at end
mem_mb=`echo $(((mem*1000)-5000))` # reduce some memory for buffer space during pre-processing
#export TEMPLATEFLOW_HOME=$HOME/.cache/templateflow
export FS_LICENSE=$HOME/Desktop/Flanker/derivatives/license.txt
-v /Home/Desktop/license.txt:/license.txt
echo "TEST, AT LEAST WE KNOW THE SCRIPT MADE IT THIS FAR"
# Run fmriprep with Docker
docker run --rm \
-v $bids_root_dir:/data:ro \
-v $bids_root_dir/derivatives:/out \
-v /Home/Desktop/license.txt:/license.txt
nipreps/fmriprep:latest \
/data /out participant \
--participant-label $subj \
--md-only-boilerplate \
/license.txt /Home/Desktop/license.txt \
--output-spaces MNI152NLin2009cAsym:res-2 \
--nthreads $nthreads \
--mem_mb $mem_mb
The output was:
bash fmriprep_singleSubj.sh.save.save.save.save.save.save.save.save.save.save.save.save.save
fmriprep_singleSubj.sh.save.save.save.save.save.save.save.save.save.save.save.save.save: line 22: -v: command not found
TEST, AT LEAST WE KNOW THE SCRIPT MADE IT THIS FAR
"docker run" requires at least 1 argument.
See 'docker run --help'.
Usage: docker run [OPTIONS] IMAGE [COMMAND] [ARG...]
Create and run a new container from an image
fmriprep_singleSubj.sh.save.save.save.save.save.save.save.save.save.save.save.save.save: line 32: nipreps/fmriprep:latest: No such file or directory
You should use the fmriprep-docker command like you were doing before, the same script that you were working with on Ubuntu. Also, what is with all of the .save file suffixs? I think you are working with backups made on your text editor?
The .save suffixes are because I edited the shell script using the nano command in the terminal and then I saved it. I have about 13 shell scripts save I believe. I ran it using the bash command not fmriprep-docker.
But fmriprep-docker should be what is in your script, that you run with bash. You can take the command you were woking with in Ubuntu, save as a bash file, and then run that.