Qsirecon "dsi_studio_autotrack"

Summary of what happened:

I preprocessed the DTI data (fmaps and DTI -single shell) using “qsiprep”. I ran the qsirecon with the “dsi_studio_autotrack” built-in reconstruction. I am getting the

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

docker run -i --rm \
-v {analysisrootdir}/sourcedata/Results/qsiprep/:/data:ro \
-v {analysisrootdir}/sourcedata/Results/qsirecon:/qsirecon-output:ro \
-v  ${FREESURFER_HOME}/license.txt:/opt/freesurfer/license.txt:ro \
-v {analysisrootdir}/sourcedata/Results/qsirecon:/out \
-v {analysisrootdir}/tmp:/scratch \
-w {analysisrootdir}/tmp \
pennlinc/qsirecon:1.0.0 \
/data /out participant \
--participant-label  sub-{subjectuid} \
--output-resolution 2 \
--fs-license-file /opt/freesurfer/license.txt  \
--recon-spec dsi_studio_autotrack     #  DSI Studio Running

Version:

1.0.0

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

Docker

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

BIDS

Relevant log outputs (up to 20 lines):

  File "/opt/conda/envs/qsiprep/bin/qsirecon", line 8, in 
    sys.exit(main())
  File "/opt/conda/envs/qsiprep/lib/python3.10/site-packages/qsirecon/cli/run.py", line 60, in main
    sentry_setup()
  File "/opt/conda/envs/qsiprep/lib/python3.10/site-packages/qsirecon/utils/sentry.py", line 102, in sentry_setup
    for k, v in config.get(flat=True).items():
  File "/opt/conda/envs/qsiprep/lib/python3.10/site-packages/qsirecon/config.py", line 744, in get
    "execution": execution.get(),
  File "/opt/conda/envs/qsiprep/lib/python3.10/site-packages/qsirecon/config.py", line 273, in get
    v = [f"{el[0].relpath}:{el[1].relpath}" for el in v]
  File "/opt/conda/envs/qsiprep/lib/python3.10/site-packages/qsirecon/config.py", line 273, in 
    v = [f"{el[0].relpath}:{el[1].relpath}" for el in v]
AttributeError: 'NoneType' object has no attribute 'relpath'
**Sentry is attempting to send 2 pending events**
Waiting up to 2 seconds
Press Ctrl-C to qui

Hi @asim.mubeen,

You should net set your output directory as read-only. It also appears you bind that folder twice (also to /out), you should only bind it once.

Can you change -i to -ti?

You set the -w folder as the original name of the folder, not the one you renamed it to. The working folder should reflect the renamed name. You should also set the working dir as a qsiprep argument.

Best,
Steven

Thanks Steven for replying,

I reran the qsiprep and then qsirecon: here is the command I used:

docker run -i \
--rm \
-v /data/ASDSch/test/data1/Results/qsiprep:/data:ro \
-v /data/ASDSch/test/data1/Results/qsirecon:/out \
-v  ${FREESURFER_HOME}/license.txt:/opt/freesurfer/license.txt:ro \
-v /data/ASDSch/test/tmp:/scratch \
-w /scratch \
pennlinc/qsirecon:1.0.0 \
/data \
/out \
participant \
--participant-label sub-$DIR \
--output-resolution 2 \
--fs-license-file /opt/freesurfer/license.txt  \
--recon-spec dsi_studio_autotrack     #  DSI Studio Running

Here is the error:

  File "/opt/conda/envs/qsiprep/bin/qsirecon", line 8, in <module>
    sys.exit(main())
  File "/opt/conda/envs/qsiprep/lib/python3.10/site-packages/qsirecon/cli/run.py", line 60, in main
    sentry_setup()
  File "/opt/conda/envs/qsiprep/lib/python3.10/site-packages/qsirecon/utils/sentry.py", line 102, in sentry_setup
    for k, v in config.get(flat=True).items():
  File "/opt/conda/envs/qsiprep/lib/python3.10/site-packages/qsirecon/config.py", line 744, in get
    "execution": execution.get(),
  File "/opt/conda/envs/qsiprep/lib/python3.10/site-packages/qsirecon/config.py", line 273, in get
    v = [f"{el[0].relpath}:{el[1].relpath}" for el in v]
  File "/opt/conda/envs/qsiprep/lib/python3.10/site-packages/qsirecon/config.py", line 273, in <listcomp>
    v = [f"{el[0].relpath}:{el[1].relpath}" for el in v]
AttributeError: 'NoneType' object has no attribute 'relpath'

Thanks for the help in advance.


Asim

Hi @asim.mubeen,

Can you change -i to -ti? Additionally, can you also specify your workdir as a QSIRecon argument (also has the -w flag).

May you also please return the tree structure of /data/ASDSch/test/data1/Results/qsiprep?

Best,
Steven

Here is the tree

data1/Results/qsiprep/
├── dataset_description.json
├── logs
│   ├── CITATION.bib
│   ├── CITATION.html
│   ├── CITATION.md
│   └── CITATION.tex
├── sub-S0088CWJ
│   ├── figures
│   │   ├── sub-S0088CWJ_about.html
│   │   └── sub-S0088CWJ_summary.html
│   ├── log
│   │   └── 20250204-175238_4b7dd705-ad0a-4261-8ea1-6183a87fcd05
│   │       └── qsiprep.toml
│   └── ses-0001
│       ├── dwi
│       │   ├── sub-S0088CWJ_ses-0001_acq-cmrr009DKI64dir2x2x2_desc-confounds_timeseries.tsv
│       │   ├── sub-S0088CWJ_ses-0001_acq-cmrr009DKI64dir2x2x2_space-ACPC_desc-brain_mask.nii.gz
│       │   ├── sub-S0088CWJ_ses-0001_acq-cmrr009DKI64dir2x2x2_space-ACPC_desc-image_qc.tsv
│       │   ├── sub-S0088CWJ_ses-0001_acq-cmrr009DKI64dir2x2x2_space-ACPC_desc-preproc_dwi.b
│       │   ├── sub-S0088CWJ_ses-0001_acq-cmrr009DKI64dir2x2x2_space-ACPC_desc-preproc_dwi.b_table.txt
│       │   ├── sub-S0088CWJ_ses-0001_acq-cmrr009DKI64dir2x2x2_space-ACPC_desc-preproc_dwi.bval
│       │   ├── sub-S0088CWJ_ses-0001_acq-cmrr009DKI64dir2x2x2_space-ACPC_desc-preproc_dwi.bvec
│       │   ├── sub-S0088CWJ_ses-0001_acq-cmrr009DKI64dir2x2x2_space-ACPC_desc-preproc_dwi.json
│       │   ├── sub-S0088CWJ_ses-0001_acq-cmrr009DKI64dir2x2x2_space-ACPC_desc-preproc_dwi.nii.gz
│       │   ├── sub-S0088CWJ_ses-0001_acq-cmrr009DKI64dir2x2x2_space-ACPC_desc-slice_qc.json
│       │   ├── sub-S0088CWJ_ses-0001_acq-cmrr009DKI64dir2x2x2_space-ACPC_dwiref.nii.gz
│       │   ├── sub-S0088CWJ_ses-0001_acq-cmrr009DKI64dir2x2x2_space-ACPC_model-eddy_stat-cnr_dwimap.json
│       │   └── sub-S0088CWJ_ses-0001_acq-cmrr009DKI64dir2x2x2_space-ACPC_model-eddy_stat-cnr_dwimap.nii.gz
│       └── figures
│           ├── sub-S0088CWJ_ses-0001_acq-cmrr009DKI64dir2x2x2_desc-acpc_dwi.svg
│           ├── sub-S0088CWJ_ses-0001_acq-cmrr009DKI64dir2x2x2_desc-biascorrpost_dwi.svg
│           ├── sub-S0088CWJ_ses-0001_acq-cmrr009DKI64dir2x2x2_desc-carpetplot_dwi.svg
│           ├── sub-S0088CWJ_ses-0001_acq-cmrr009DKI64dir2x2x2_desc-denoising_dwi.svg
│           ├── sub-S0088CWJ_ses-0001_acq-cmrr009DKI64dir2x2x2_desc-resampled_b0ref.svg
│           ├── sub-S0088CWJ_ses-0001_acq-cmrr009DKI64dir2x2x2_desc-samplingscheme_dwi.gif
│           └── sub-S0088CWJ_ses-0001_acq-cmrr009DKI64dir2x2x2_desc-summary_dwi.html
└── sub-S0088CWJ.html

I used -ti and workdir as a QSIrRecon argument but the output is the same:

Traceback (most recent call last):
  File "/opt/conda/envs/qsiprep/bin/qsirecon", line 8, in <module>
    sys.exit(main())
  File "/opt/conda/envs/qsiprep/lib/python3.10/site-packages/qsirecon/cli/run.py", line 60, in main
    sentry_setup()
  File "/opt/conda/envs/qsiprep/lib/python3.10/site-packages/qsirecon/utils/sentry.py", line 102, in sentry_setup
    for k, v in config.get(flat=True).items():
  File "/opt/conda/envs/qsiprep/lib/python3.10/site-packages/qsirecon/config.py", line 744, in get
    "execution": execution.get(),
  File "/opt/conda/envs/qsiprep/lib/python3.10/site-packages/qsirecon/config.py", line 273, in get
    v = [f"{el[0].relpath}:{el[1].relpath}" for el in v]
  File "/opt/conda/envs/qsiprep/lib/python3.10/site-packages/qsirecon/config.py", line 273, in <listcomp>
    v = [f"{el[0].relpath}:{el[1].relpath}" for el in v]
AttributeError: 'NoneType' object has no attribute 'relpath'

Best,


Asim

What version of qsiprep was used?

The version I used for qsiprep is 1.0.0.

Hi @asim.mubeen,

I see here (qsirecon/qsirecon/cli/parser.py at 4f7dbdeb19107a07cd741987b1bceb67c33316b2 · PennLINC/qsirecon · GitHub) that the processing_list object is coming from gathering the qsiprep data, so for some reason it must not be finding your data. Can you confirm that sub-$DIR is defined correctly, and also just try $DIR (no sub- prefix)?

Best,
Steven

Yes $DIR is defined correctly. I did check that. One thing I want to mentioned that I am using dwi and fmap without structural images. The qsiprep was run with --dwi-only and --anat-modality none. options

Did you try removing the sub- prefix? What about leaving the participant label argument out altogether? Just as a test.

Hi @asim.mubeen on second thought this might be a bug due to the anat only qsiprep reconstruction. See here: qsirecon/qsirecon/cli/parser.py at 4f7dbdeb19107a07cd741987b1bceb67c33316b2 · PennLINC/qsirecon · GitHub, the lack of anat scan is contributing a None object to the config file which is leading to that error. We will work on this bug and update you.

1 Like

Thank you Steven! You are a great help!!


Asim