quality-check pet-linear - Failed!

10 views
Skip to first unread message

Shahzad ALi

unread,
Apr 24, 2025, 8:42:51 AMApr 24
to clinic...@googlegroups.com
Hi Dear Alice,
I am trying to perform quality check for the pet-linear using:
clinicadl quality-check pet-linear CAPS_DIR QC_pet_linear_fdg.tsv 18FFDG pons2 --participants_tsv participants.tsv 

and I am having the following error:

Traceback (most recent call last):

  File "/Users/shahzadali/miniconda3/envs/clinicadlEnv/bin/clinicadl", line 8, in <module>

    sys.exit(cli())

             ^^^^^

  File "/Users/shahzadali/miniconda3/envs/clinicadlEnv/lib/python3.11/site-packages/click/core.py", line 1161, in __call__

    return self.main(*args, **kwargs)

           ^^^^^^^^^^^^^^^^^^^^^^^^^^

  File "/Users/shahzadali/miniconda3/envs/clinicadlEnv/lib/python3.11/site-packages/click/core.py", line 1082, in main

    rv = self.invoke(ctx)

         ^^^^^^^^^^^^^^^^

  File "/Users/shahzadali/miniconda3/envs/clinicadlEnv/lib/python3.11/site-packages/click/core.py", line 1697, in invoke

    return _process_result(sub_ctx.command.invoke(sub_ctx))

                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

  File "/Users/shahzadali/miniconda3/envs/clinicadlEnv/lib/python3.11/site-packages/click/core.py", line 1697, in invoke

    return _process_result(sub_ctx.command.invoke(sub_ctx))

                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

  File "/Users/shahzadali/miniconda3/envs/clinicadlEnv/lib/python3.11/site-packages/click/core.py", line 1443, in invoke

    return ctx.invoke(self.callback, **ctx.params)

           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

  File "/Users/shahzadali/miniconda3/envs/clinicadlEnv/lib/python3.11/site-packages/click/core.py", line 788, in invoke

    return __callback(*args, **kwargs)

           ^^^^^^^^^^^^^^^^^^^^^^^^^^^

  File "/Users/shahzadali/miniconda3/envs/clinicadlEnv/lib/python3.11/site-packages/clinicadl/quality_check/pet_linear/cli.py", line 52, in cli

    pet_linear_qc(

  File "/Users/shahzadali/miniconda3/envs/clinicadlEnv/lib/python3.11/site-packages/clinicadl/quality_check/pet_linear/quality_check.py", line 109, in quality_check

    input_files = clinicadl_file_reader(subjects, sessions, caps_dir, file_type)[0]

                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

  File "/Users/shahzadali/miniconda3/envs/clinicadlEnv/lib/python3.11/site-packages/clinicadl/utils/clinica_utils.py", line 1071, in clinicadl_file_reader

    raise ClinicaDLCAPSError(error_message)

clinicadl.utils.exceptions.ClinicaDLCAPSError: Clinica encountered 1564 problem(s) while getting :

Please note that the following clinica pipeline(s) must have run to obtain these files: pet-linear

* (sub-ADNI007S0316 | ses-M000): No file found


* (sub-ADNI002S6652 | ses-M000): No file found

.

.

.

* (sub-ADNI009S4814 | ses-M000): No file found




However, the scans are available in the CAPS_Dir/pet-linear directory as can be seen in the attached screenshot.

This is happening for pet-linear, however, the quality check for t1 was doone successfully using:


clinicadl quality-check t1-linear CAPS_DIR QC_t1_linear.tsv --no-gpu


Best,

Shahzad 

-----------------------------------------------------------------------

Screenshot 2025-04-24 at 14.39.28.png

camille brianceau

unread,
Apr 29, 2025, 3:01:06 AMApr 29
to Clinica

Hello Shahzad,

Could you please provide an example of a path to a NIfTI PET file from your CAPS structure? Something like:
`caps/subjects/sub-0001/ses-M001/pet-linear/sub-0001_ses-M001_***_pet.nii.gz`

Also, could you let me know which version of ClinicaDL you are currently using?

Thank you!

Bests,

Camille

Shahzad ALi

unread,
Apr 29, 2025, 3:56:28 AMApr 29
to clinic...@googlegroups.com

Hi, Dear Camille, 

Thanks for the respone.
Here is the required information:

clinicadl --version: 

  • clinicadl, version 1.6.1

Path to the pet nifti files:

  • CAPS_DIR/CAPS_Multimodal/subjects/sub-ADNI022S0130/ses-M000/pet_linear/sub-ADNI022S0130_ses-M000_trc-18FFDG_rec-coregiso_space-MNI152NLin2009cSym_desc-Crop_res-1x1x1_suvr-pons2_pet.nii.gz
  • CAPS_DIR/CAPS_Multimodal/subjects/sub-ADNI022S0130/ses-M000/pet_linear/sub-ADNI022S0130_ses-M000_trc-18FFDG_rec-coregiso_space-T1w_pet.nii.g

  • CAPS_DIR/CAPS_Multimodal/subjects/sub-ADNI022S4196/ses-M000/pet_linear/sub-ADNI022S4196_ses-M000_trc-18FAV45_space-T1w_pet.nii.gz
  • CAPS_DIR/CAPS_Multimodal/subjects/sub-ADNI022S4196/ses-M000/pet_linear/sub-ADNI022S4196_ses-M000_trc-18FAV45_space-MNI152NLin2009cSym_desc-Crop_res-1x1x1_suvr-cerebellumPons2_pet.nii.gz
  • CAPS_DIR/CAPS_Multimodal/subjects/sub-ADNI022S4196/ses-M000/pet_linear/sub-ADNI022S4196_ses-M000_trc-18FFDG_rec-coregiso_space-MNI152NLin2009cSym_desc-Crop_res-1x1x1_suvr-pons2_pet.nii.gz
  • CAPS_DIR/CAPS_Multimodal/subjects/sub-ADNI022S4196/ses-M000/pet_linear/sub-ADNI022S4196_ses-M000_trc-18FFDG_rec-coregiso_space-T1w_pet.nii.gz



Best,

Shahzad 

-----------------------------------------------------------------------



--
You received this message because you are subscribed to the Google Groups "Clinica" group.
To unsubscribe from this group and stop receiving emails from it, send an email to clinica-user...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/clinica-user/027d1706-70f2-47e6-8eb2-d328b74c0346n%40googlegroups.com.

camille brianceau

unread,
Apr 29, 2025, 8:24:48 AMApr 29
to Clinica
Hi Shahzad,

It seems that ClinicaDL currently doesn't take the rec-coregiso_ pattern into account, which is likely why it's not finding the files. This is something we need to address, but in the meantime, you can try running your command like this:

clinicadl quality-check pet-linear CAPS_DIR QC_pet_linear_fdg.tsv 18FFDG_rec-coregiso pons2 --participants_tsv participants.tsv 

Please let me know if that works. If it does, I think this workaround should also help with the other issue you encountered.

Just so you're aware, we're currently doing a major refactoring of ClinicaDL. The command-line interface will be removed, as ClinicaDL is transitioning into a Python package. While this will introduce many changes, it will also come with tutorials and comprehensive documentation.

Best, 
Camille

Shahzad ALi

unread,
Apr 29, 2025, 4:32:28 PMApr 29
to clinic...@googlegroups.com
Dear Camille,
Thank you for your support, the command worked perfectly! I did notice some warnings during execution; and I guess it's not affect the actual results, as the output file is generated.
 
clinicadl quality-check pet-linear CAPS_DIR QC_pet_linear_fdg.tsv 18FFDG_rec-coregiso pons2 --participants_tsv participants.tsv 


/Users/shahzadali/miniconda3/envs/clinicadlEnv/lib/python3.11/site-packages/clinicadl/quality_check/pet_linear/quality_check.py:142: FutureWarning: In a future version, object-dtype columns with all-bool values will not be included in reductions with bool_only=True. Explicitly cast to bool dtype instead.

  all_df = pd.concat([all_df, subject_df])

/Users/shahzadali/miniconda3/envs/clinicadlEnv/lib/python3.11/site-packages/clinicadl/quality_check/pet_linear/quality_check.py:142: FutureWarning: In a future version, object-dtype columns with all-bool values will not be included in reductions with bool_only=True. Explicitly cast to bool dtype instead.



clinicadl quality-check pet-linear CAPS_DIR QC_pet_linear_av45.tsv 18FAV45 cerebellumPons2 --participants_tsv participants.tsv


/Users/shahzadali/miniconda3/envs/clinicadlEnv/lib/python3.11/site-packages/clinicadl/quality_check/pet_linear/quality_check.py:142: FutureWarning: In a future version, object-dtype columns with all-bool values will not be included in reductions with bool_only=True. Explicitly cast to bool dtype instead.

  all_df = pd.concat([all_df, subject_df])

/Users/shahzadali/miniconda3/envs/clinicadlEnv/lib/python3.11/site-packages/clinicadl/quality_check/pet_linear/quality_check.py:142: FutureWarning: In a future version, object-dtype columns with all-bool values will not be included in reductions with bool_only=True. Explicitly cast to bool dtype instead.

  all_df = pd.concat([all_df, subject_df])


Also, regarding the upcoming ClinicaDL refactoring, just out of curiosity, will the results generated with the current CLI version remain usable (of course, yes🙏) after the transition to the Python package?


Thanks again for your support!


Best,

Shahzad 

-----------------------------------------------------------------------



Reply all
Reply to author
Forward
0 new messages