QSIPrep stuck but no Error

Hi. I run the QSIPrep to do recon. But some subjects stuck in track_ifod2/tractography.
There are no error to merge. Because this problem didn’t merge for some subjects.
So, I didn’t know what I can do next. Could someone help me?

This is my qsiprep command:

qsiprep-docker /mnt/workdir/DCM/BIDS /mnt/workdir/DCM/BIDS/derivatives/qsiprep participant --participant_label sub-060 sub-065 sub-076  --output-resolution 2 
--recon-only --recon_input /mnt/workdir/DCM/BIDS/derivatives/qsiprep --recon_spec /mnt/workdir/DCM/Docs/Reference/qsiprep/mrtrix_multishell_msmt_ACT-hsvs.json --fs-license-file /mnt/data/license.txt --freesurfer-input /mnt/workdir/DCM/BIDS/derivatives/freesurfer -w /mnt/workdir/DCM/working --custom_atlases /mnt/workdir/DCM/Docs/Reference/qsiprep/qsirecon_atlases --nthreads 88 --gpus all --stop-on-first-crash

This is the output log:
log.txt (195.1 KB)

This is what I found in the stucking subjects.

[
    [
        "act_file",
        [
            "/scratch/qsirecon_wf/sub-060_mrtrix_multishell_msmt_hsvs/anat_ingress_wf/apply_header_to_5tt/sub-060_5tt_hdrxform.nii.gz",
            "d300b38f25cb2462f9f618a34a6edcc0"
        ]
    ],
    [
        "algorithm",
        "iFOD2"
    ],
    [
        "backtrack",
        true
    ],
    [
        "crop_at_gmwmi",
        true
    ],
    [
        "in_file",
        [
            "/scratch/qsirecon_wf/sub-060_mrtrix_multishell_msmt_hsvs/sub_060_dir_PA_space_T1w_desc_preproc_recon_wf/msmt_csd/intensity_norm/sub-060_dir-PA_space-T1w_desc-preproc_dwi_wm_mtnorm.mif",
            "674ae541d71d67a3d073818541110b11"
        ]
    ],
    [
        "max_length",
        "250.0000000000"
    ],
    [
        "min_length",
        "30.0000000000"
    ],
    [
        "n_samples",
        4
    ],
    [
        "out_file",
        "tracked.tck"
    ],
    [
        "out_seeds",
        "out_seeds.nii.gz"
    ],
    [
        "power",
        "0.3300000000"
    ],
    [
        "quiet",
        true
    ],
    [
        "seed_dynamic",
        [
            "/scratch/qsirecon_wf/sub-060_mrtrix_multishell_msmt_hsvs/sub_060_dir_PA_space_T1w_desc_preproc_recon_wf/msmt_csd/intensity_norm/sub-060_dir-PA_space-T1w_desc-preproc_dwi_wm_mtnorm.mif",
            "674ae541d71d67a3d073818541110b11"
        ]
    ],
    [
        "select",
        10000000
    ]
]

Hi @YukunQu

How big was the tracked.tck file? That is the tractogram that is being generated that step. Also I wouldn’t use 88 cores. I would limit it to no more than 32, and use —omp_nthreads of 16.

Best,
Steven

Thank you for your mention. The tracked.tck file is 1.9 kb. Yes, it is too small in contrast to the unusual “10G” in my data.

BTW, because I run those command in a machine with 104 cores. So I want to add many subjects at the meantime to accelerate speed. e.g.,11 subjects. Do you mean the operation will delay the calculation or induce other problem?

Hi @YukunQu,

My guess is that the FreeSurfer registration went bad, and that no streamlines are passing so the tractogram generation is stuck. Can you visualize the 5TT image and see if it aligns with the DWI data and/or qsiprep-derived T1?

Ah, I thought this was just for a single subject, never mind! I should have seen that you are using multiple subjects in your command.

Best,
Steven

Great! You are right. The 5TT image is also small in contract to normal 5TT image. It doesn’t aligns with the DWI data and qsiprep-derived T1.
It is a good start!
I can rerun the pipeline for those subjects. Do you any other suggestions to prevent this problem?

It’s good that we found the problem! The bad news is that I don’t know a great alternative if rerunning subjects doesn’t work. I’ve seen this happen too but rarely enough that I was okay simply excluding subjects who this happened to. I suppose you can try to run your own registration between FreeSurfer and qsiprep outputs and put files in the Qsirecon scratch folder, but it sounds tedious and I’m still not sure it would work.

1 Like