Anat files for qsiprep

Summary of what happened:

I want to use anat SSWarper images for qsiprep instead of the original T1w images. recon-all has been run. I have given a flag --anat-modality none as I had gotten a previous error which was asking for the T1w files. I get an error saying file ‘none’ not found. This means it requires some file and I was wondering how I can denote that.

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

module load singularity

set -eu
umask 0002

# Configuration
subject=sub-002
version=0.22.1

# Directory structure
bids_root=/data/mgh-meditation/mihir/converted
bids_dir=${bids_root}/${subject}/bids
output_dir=/data/mgh-meditation/mihir/derivatives_qsi
work_dir=/data/mgh-meditation/mihir/work_qsiprep/${subject}
anat_dir=${bids_root}/${subject}/anat/SSWarper

# Create directories
cache_dir=${work_dir}/.cache
mkdir -p ${cache_dir}
mkdir -p ${output_dir}/{qsiprep,qsirecon}_${version}
mkdir -p ${work_dir}

# Paths
qsiprep_img=/data/mgh-meditation/mihir/qsiprep-${version}.sif
recon_spec=/data/mgh-meditation/mihir/recon_spec.json
fs_license=/data/mgh-meditation/mihir/freesurfer_output_final_anatSS/license.txt

cmd="singularity run --writable-tmpfs -e \
    -B ${bids_dir},${output_dir},${work_dir},${cache_dir},${anat_dir},/data/mgh-meditation/mihir/freesurfer_output_final_anatSS/ \
    ${qsiprep_img} \
    ${bids_dir} \
    ${output_dir} \
    participant \
    --participant-label ${subject} \
    -w ${work_dir} \
    --fs-license-file ${fs_license} \
    --anat-modality none \
    --unringing-method mrdegibbs \
    --ignore fieldmaps \
    --output-resolution 1.25 \
    --stop-on-first-crash \
    --notrack \
    --mem-mb 31500 \
    --nthreads 16 \
    --omp-nthreads 8 \
    --recon-spec mrtrix_multishell_msmt_ACT-hsvs \
    --skip-bids-validation \
    --freesurfer-input /data/mgh-meditation/mihir/freesurfer_output_final_anatSS/"

recon_only=" --recon-only --recon-input ${output_dir}/qsiprep_${version}"

echo "Processing ${subject}"
if [ ! -e ${output_dir}/qsiprep_${version}/${subject}.html ]; then
    eval ${cmd}
else 
    eval ${cmd}${recon_only}
fi

Version:

0.22.1

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

Singularity

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

 file none does not exist . 
--- Logging error ---
Traceback (most recent call last):
  File "/opt/conda/envs/qsiprep/lib/python3.10/logging/__init__.py", line 1100, in emit
    msg = self.format(record)
  File "/opt/conda/envs/qsiprep/lib/python3.10/logging/__init__.py", line 943, in format
    return fmt.format(record)
  File "/opt/conda/envs/qsiprep/lib/python3.10/logging/__init__.py", line 678, in format
    record.message = record.getMessage()
  File "/opt/conda/envs/qsiprep/lib/python3.10/logging/__init__.py", line 368, in getMessage
    msg = msg % self.args
TypeError: not all arguments converted during string formatting
Call stack:
  File "<string>", line 1, in <module>
  File "/opt/conda/envs/qsiprep/lib/python3.10/multiprocessing/forkserver.py", line 274, in main
    code = _serve_one(child_r, fds,
  File "/opt/conda/envs/qsiprep/lib/python3.10/multiprocessing/forkserver.py", line 313, in _serve_one
    code = spawn._main(child_r, parent_sentinel)
  File "/opt/conda/envs/qsiprep/lib/python3.10/multiprocessing/spawn.py", line 129, in _main
    return self._bootstrap(parent_sentinel)

Screenshots / relevant information:

While checking the logs, the error occurs somewhere after the ‘eddy’.
Grateful for any help! Thanks!

Mihir


Hi @mwalvekar,

Can you please update qsiprep to the most recent version (1.0.0rc1) and try again? Additionally, you should add —containall as a singularity flag.

Best,
Steven

hi @Steven ,
I’m having the same problem with 1.0.0rc2 (“file none not exist” and “Logging error”), my input dataset consists of T1w.nii.gz, T1w.json, dwi.nii.gz, dwi.bvec, dwi.bval and dwi.json for each subject.
However, the entire qsi pipeline runs completely and shows “No errors to report!” in the html file, but I’m not sure if the results from this can be used in a subsequent qsirecon pipeline.

Hi @WYSHI and welcome to neurostars!

There’s not enough information in your post for me to debug. Can you please provide all the information prompted in the original post? That being said, if you have the full qsiprep outputs you should be able to run Qsirecon fine.

Without seeing more log I can’t say for certain but this might just be that DSI Studio uses emojis which may not display nicely on some softwares. Not a fatal error though.

Best,
Steven