Running fMRI prep on Linux

Summary of what happened:

I am using fMRIPrep-23.2.1 on a Linux computer. My files are on the computer’s desktop, and I have copied the path directly into my script. However, I continue receiving an error related to my fs license. It states, “fmriprep: error: Path does not exist: </home/nens/Desktop/fs_license/license.txt>.” I have also attempted removing the forward slash before my path names, and continue to receive the same error. Thank you for your help!

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

docker run --rm nipreps/fmriprep \
--participant_label sub-004 -w /home/nens/Desktop/BIDS/workingFolder \
--fs-license-file /home/nens/Desktop/fs_license.txt \
--skip-bids-validation --dummy-scans 1 --output-spaces MNI152NLin2009Asym:res-2 \
/home/nens/Desktop/BIDS/raw /home/nens/Desktop/BIDS/derivatives participant

Version:

23.2.1

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

Docker

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):

fmriprep: error: Path does not exist: </home/nens/Desktop/fs_license/license.txt>

Screenshots / relevant information:


Hi @cspelman, and welcome to neurostars!

You need to mount files to Docker so the container has access to them. Also, working directory should not be in BIDS folder. I also recommend not skipping bids validation. Additionally, derivatives should be placed within the BIDS directory (e.g., the derivatives folder is placed on the same level of the sub-XX raw data folders). You should also specify a version incase there are new releases while you are processing data.

For example, see here: Usage Notes — fmriprep version documentation

Modified code below:

docker run -ti --rm \
-v /home/nens/Desktop/BIDS/:/input:ro \ # where sub-XX raw data folders should be 
-v /home/nens/Desktop/BIDS/derivatives/fmriprep:/output \ # where outputs will go
-v /path/to/working/dir:/work \ # place this outside 
-v /home/nens/Desktop/fs_license.txt:/license.txt \
nipreps/fmriprep:24.0.1 \ # note the specified version, which is the latest at this time
--participant_label sub-004 \
-w /work \
--fs-license-file /license.txt \ 
--dummy-scans 1 \
--output-spaces MNI152NLin2009Asym:res-2 \
/input /output participant

Best,
Steven