Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error with plot peaks crashes qsirecon #118

Open
aazor opened this issue Oct 10, 2024 · 1 comment
Open

Error with plot peaks crashes qsirecon #118

aazor opened this issue Oct 10, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@aazor
Copy link

aazor commented Oct 10, 2024

QSI recon/DSIstudio autotrack won't run successfully. I encountered a 'FileNotFoundError' during QSIRecon processing, specifically when trying to generate the peaks_mosaic.png file in the plot_peaks node. The workflow fails during this step with the following error:

FileNotFoundError: No such file or directory '/path/to/output/peaks_mosaic.png' for output 'peak_report' of a CLIReconPeaksReport interface.

Additional details

  • QSIRecon version: 0.22.1
  • Docker version:
  • Singularity version: apptainer 1.1.7

What were you trying to do?

Run QSI recon/DSIstudio autotrack after successfully running qsiprep.

What did you expect to happen?

Get autotrack results (successfully tested on another population. This population is more challenging from an anatomical perspective)

What actually happened?

This error occurred after the successful execution of the gqi_recon node.

Reproducing the bug

Tried running qsiprep and psi recon back to back. Only got results for qsiprep. Ran qsirecon only (code below).

# Check if QSIPrep outputs already exist
if [ ! -e ${output_dir}/qsiprep_${qsiprep_version}/${subject}/ses-T1/anat/${subject}_ses-T1_desc-preproc_T1w.nii.gz ]; then
    echo "Running QSIPrep for ${subject}"
	
	# Define the QSIRecon command (adjust if needed)
    qsirecon_cmd="apptainer run -B ${scratch},${templateflow_dir} $qsiprep_IMG --participant_label ${subject:4} -w $scratch --output_resolution 1.25 --longitudinal --unringing-method mrdegibbs --recon-spec dsi_studio_autotrack --fs-license-file ${scratch}/license.txt --skip-bids-validation --notrack --mem_mb 60000 --nthreads 12 --omp-nthreads 8 --stop-on-first-crash --recon-only --recon-input $scratch/data/derivatives/qsiprep $scratch/data/ $scratch/data/derivatives participant"

    # Run the QSIRecon command
    echo "Running QSIRecon for: ${subject}"
    ${qsirecon_cmd}
else
    echo "QSIPrep output not found for ${subject}, skipping QSIRecon."
fi

-->

@aazor aazor added the bug Something isn't working label Oct 10, 2024
@aazor
Copy link
Author

aazor commented Oct 10, 2024

Error traceback:
Traceback:
Traceback (most recent call last):
File "/opt/conda/envs/qsiprep/lib/python3.10/site-packages/nipype/interfaces/base/core.py", line 453, in aggregate_outputs
setattr(outputs, key, val)
File "/opt/conda/envs/qsiprep/lib/python3.10/site-packages/nipype/interfaces/base/traits_extension.py", line 330, in validate
value = super(File, self).validate(objekt, name, value, return_pathlike=True)
File "/opt/conda/envs/qsiprep/lib/python3.10/site-packages/nipype/interfaces/base/traits_extension.py", line 135, in validate
self.error(objekt, name, str(value))
File "/opt/conda/envs/qsiprep/lib/python3.10/site-packages/traits/base_trait_handler.py", line 74, in error
raise TraitError(
traits.trait_errors.TraitError: The 'peak_report' trait of a _ReconPeaksReportOutputSpec instance must be a pathlike object or string representing an existing file, but a value of '/om2/scratch/tmp/aazor/hemi_proc/sub-HEMI01/qsirecon_0_22_wf/sub-HEMI01_dsistudio_pipeline/sub_HEMI01_ses_T1_acq_MDDW64_dir_PA_space_T1w_desc_preproc_recon_wf/dsistudio_gqi/plot_peaks/peaks_mosaic.png' <class 'str'> was specified.

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 400, in run
    outputs = self.aggregate_outputs(runtime)
  File "/opt/conda/envs/qsiprep/lib/python3.10/site-packages/nipype/interfaces/base/core.py", line 460, in aggregate_outputs
    raise FileNotFoundError(msg)
FileNotFoundError: No such file or directory '/om2/scratch/tmp/aazor/hemi_proc/sub-HEMI01/qsirecon_0_22_wf/sub-HEMI01_dsistudio_pipeline/sub_HEMI01_ses_T1_acq_MDDW64_dir_PA_space_T1w_desc_preproc_recon_wf/dsistudio_gqi/plot_peaks/peaks_mosaic.png' for output 'peak_report' of a CLIReconPeaksReport interface

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant