QSIrecon failing for analysis_level flag

Summary of what happened:

Hi,

I am trying to run QSIrecon for the first time. (For now I am just using the given yaml and later I will use the customised.) However, whichever order I try the flags, it keeps giving errors regarding the ‘analysis level’.

I would be really grateful for any help - to know what is wrong.

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

time apptainer run -B $bids_dir:/data -B $input_dir:/in -B $output_dir:/out -B $work_dir:/work \
  qsirecon_0.23.0.sif \
    --containall \
    --writable-tmpfs \
    -B "${data}" \
    /in /out \
    participant --participant-label $sid \
    -w /work \
    --nthreads 4 \
    --omp-nthreads 4 \
    --recon-spec pyafq_tractometry \
    --fs-license-file=license.txt \
    -v -v
echo "Done"

Version:

0.23.0

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

Apptainer

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

The data is in BIDS format and was preprocessed using qsiprep

Relevant log outputs (up to 20 lines):

Various outputs from different attempts:
qsirecon: error: argument analysis_level: invalid choice: '/out' (choose from 'participant')
qsirecon: error: argument analysis_level: invalid choice: '/in' (choose from 'participant')
qsirecon: error: Path does not exist: <participant>.
qsirecon: error: the following arguments are required: analysis_level

Screenshots / relevant information:


Hi @MRI_New,

Please update to most recent version.

These are apptainer run arguments, not qsirecon arguments. They should be moved up to the apptainer run preamble.

Your license was not mounted to the container, so it will not be found. It is not needed for pyafq, but will be needed for HSVS tractography.

Best,
Steven

1 Like

Hi,

This change worked thank you. However the script is still not running fully and I am getting a few errors:
This is being run on a university HPC.

Error type 1:

CRITICAL:nipype.workflow:QSIRecon failed: Traceback (most recent call last):
  File "/opt/conda/envs/qsiprep/lib/python3.10/site-packages/nipype/pipeline/plugins/multiproc.py", line 67, in run_node
    result["result"] = node.run(updatehash=updatehash)
  File "/opt/conda/envs/qsiprep/lib/python3.10/site-packages/nipype/pipeline/engine/nodes.py", line 527, in run
    result = self._run_interface(execute=True)
  File "/opt/conda/envs/qsiprep/lib/python3.10/site-packages/nipype/pipeline/engine/nodes.py", line 645, in _run_interface
    return self._run_command(execute)
  File "/opt/conda/envs/qsiprep/lib/python3.10/site-packages/nipype/pipeline/engine/nodes.py", line 771, in _run_command
    raise NodeExecutionError(msg)
nipype.pipeline.engine.nodes.NodeExecutionError: Exception raised while executing Node get_template.

Traceback:
        Traceback (most recent call last):
          File "/opt/conda/envs/qsiprep/lib/python3.10/site-packages/templateflow/api.py", line 338, in _s3_get
            f.write(data)
        OSError: [Errno 28] No space left on device

        During handling of the above exception, another exception occurred:

        Traceback (most recent call last):
          File "/opt/conda/envs/qsiprep/lib/python3.10/site-packages/nipype/interfaces/base/core.py", line 397, in run
            runtime = self._run_interface(runtime)
          File "/opt/conda/envs/qsiprep/lib/python3.10/site-packages/qsirecon/interfaces/anatomical.py", line 325, in _run_interface
            get_template(
          File "/opt/conda/envs/qsiprep/lib/python3.10/site-packages/templateflow/conf/__init__.py", line 92, in wrapper
            return func(*args, **kwargs)
          File "/opt/conda/envs/qsiprep/lib/python3.10/site-packages/templateflow/api.py", line 172, in get
            _s3_get(filepath)
          File "/opt/conda/envs/qsiprep/lib/python3.10/site-packages/templateflow/api.py", line 334, in _s3_get
            with filepath.open('wb') as f:
        OSError: [Errno 28] No space left on device

I have tried binding my tmp to the apptainer - but i still get this error. Do you know how much space QSIRecon requires and where it looks for it? If you have solved this error previously I would be grateful for any advice.

Error Type 2:

250220-15:49:12,702 nipype.utils WARNING:
         DatasetType key not in /in/dataset_description.json. Assuming 'derivative'.
WARNING:nipype.utils:DatasetType key not in /in/dataset_description.json. Assuming 'derivative'.
250220-15:49:12,702 nipype.utils WARNING:
         'preprocessed' is already a dataset link. Overwriting.
WARNING:nipype.utils:'preprocessed' is already a dataset link. Overwriting.
250220-15:49:12,729 cli INFO:
         QSIRecon pipeline suffixes: ['PYAFQ']
INFO:cli:QSIRecon pipeline suffixes: ['PYAFQ']
250220-15:49:13,129 nipype.utils WARNING:
         DatasetType key not in /in/dataset_description.json. Assuming 'derivative'.
WARNING:nipype.utils:DatasetType key not in /in/dataset_description.json. Assuming 'derivative'.
250220-15:49:13,129 nipype.utils WARNING:
         'preprocessed' is already a dataset link. Overwriting.
WARNING:nipype.utils:'preprocessed' is already a dataset link. Overwriting.

I am running QSIrecon on the outputted data from QSIprep - does this error indicate that QSIprep was not successful?

Hi @MRI_New

Try doing -e instead of --containall. Or specify a templateflow home outside of your home directory. export APPTAINERENV_TEMPLATEFLOW_HOME=/new/directory, and then make sure that directory is also mounted in the container.

This is not an error, it’s a warning you can ignore.

Best,
Steven