Fmriprep-docker: error: argument analysis_level: invalid choice: ... (choose from 'participant')

Summary of what happened:

Dear experts,
when I’m running fmriprep-docker (fmriprep version 23.2) without specifying the --output-spaces everything is fine and I get the data in MNI152Nlin2009cAsym space. However, I want the data with 2x2x2 mm resolution and defined additionally the output-spaces --output-spaces MNI152Nlin6Asym:res-2 MNI152Nlin2009cAsym. Then I get the error RuntimeError: Custom template MNI152Nlin6Asym:res-2 requires a tpl- prefix. In the next step I defined -v /home/rfveit/.cache/templateflow:/home/fmriprep/.cache/templateflow and the following error message appears.

I think the positional arguments are ok starting with bidsdir outputdir and participant. Any ideas to solve the problem.

Ralf

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

fmriprep-docker -w /export/local/tmp_local \
-v /home/rfveit/.cache/templateflow:/home/fmriprep/.cache/templateflow \
/server/fo2-22/data/projekt_xxx/resting_state/BIDS/inputs \
/server/fo2-22/data/projekt_xxx/resting_state/BIDS/derivatives \
participant \
--participant-label P14 P15 P16 P17 \
--skip-bids-validation \
--output-spaces tpl-MNI152Nlin6Asym:res-2 tpl-MNI152Nlin2009cAsym \
--fs-license-file /opt_prg/freesurfer_741/license.txt 

Version:

23.2.0

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

usage: fmriprep-docker [-h] [--version] [-i IMG] [-w WORK_DIR] [--output-spaces [OUTPUT_SPACES ...]] [--fs-license-file PATH]
                       [--fs-subjects-dir PATH] [--config-file PATH] [-d PATH [PATH ...]] [--use-plugin PATH] [--bids-database-dir PATH]
                       [--bids-filter-file PATH] [--patch PACKAGE=PATH [PACKAGE=PATH ...]] [--shell] [--config PATH] [-e ENV_VAR value] [-u USER]
                       [--network NETWORK] [--no-tty]
                       [bids_dir] [output_dir] [{participant}]
fmriprep-docker: error: argument analysis_level: invalid choice: '/server/fo2-22/data/projekt_xxx/resting_state/BIDS/derivatives' (choose from 'participant').

Screenshots / relevant information:


A few things:

  1. fmriprep-docker does not take -v arguments. If you want to add additional mounts, run fmriprep-docker without it, and copy the RUNNING: command and then insert your -v mounts.
  2. Parsing command-line arguments can be ambiguous. The simplest way to ensure an unambiguous parsing, IMO, is fmriprep-docker $INPUT $OUTPUT participant $ADDITIONAL_FLAGS.
  3. You have a lowercase L in your NLin templates: MNI152Nlin2009cAsym

I would write this:

fmriprep-docker /server/fo2-22/data/projekt_xxx/resting_state/BIDS/inputs \
    /server/fo2-22/data/projekt_xxx/resting_state/BIDS/derivatives participant \
    --participant-label P14 P15 P16 P17 \
    --output-spaces MNI152NLin6Asym:res-2 MNI152NLin2009cAsym \
    --fs-license-file /opt_prg/freesurfer_741/license.txt \
    -w /export/local/tmp_local

Thanks for your fast response. Now its running without error messages.

1 Like