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

Multiple issues with visualqc_diffusion #78

Open
araikes opened this issue Oct 20, 2023 · 5 comments
Open

Multiple issues with visualqc_diffusion #78

araikes opened this issue Oct 20, 2023 · 5 comments

Comments

@araikes
Copy link

araikes commented Oct 20, 2023

  • visualqc version: pip installed
  • Python version: 3.10
  • Operating System: Centos 7

Description

Testing visualqc_diffusion on rodent data. Data are BIDS formatted.
Issues (relative to current documentation):

  1. Default outlier detection is based on 'dvars' by documentation but not implemented for diffusion
  2. --disable-outlier-detection is noted as a flag in the documentation but is not actually a flag (only -old)
  3. AttributeError: 'GrouperView' object has no attribute 'join'. Did you mean: 'joined'?

What I Did

(qctools) [adamraikes@gpu68 app_apoe]$ visualqc_diffusion -b nifti_datalad -o visualqc

Diffusion MRI module
Time stamp : 2023-10-20 08:49:10

version info: visualqc 0.6.6
numpy 1.26.1 / scipy 1.11.3 / matplotlib 3.8.0
python 3.10.12 | packaged by conda-forge | (main, Jun 23 2023, 22:40:32) [GCC 12.3.0]
platform Linux-3.10.0-1160.92.1.el7.x86_64-x86_64-with-glibc2.17
#1 SMP Tue Jun 20 11:48:01 UTC 2023


	Linux distribution: {'NAME': 'CentOS Linux', 'ID': 'centos', 'PRETTY_NAME': 'CentOS Linux 7 (Core)', 'VERSION': '7 (Core)', 'ID_LIKE': 'rhel fedora', 'VERSION_ID': '7', 'ANSI_COLOR': '0;31', 'CPE_NAME': 'cpe:/o:centos:centos:7', 'HOME_URL': 'https://www.centos.org/', 'BUG_REPORT_URL': 'https://bugs.centos.org/', 'CENTOS_MANTISBT_PROJECT': 'CentOS-7', 'CENTOS_MANTISBT_PROJECT_VERSION': '7', 'REDHAT_SUPPORT_PRODUCT': 'centos', 'REDHAT_SUPPORT_PRODUCT_VERSION': '7'}
Traceback (most recent call last):
  File "/home/u26/adamraikes/.conda/envs/qctools/bin/visualqc_diffusion", line 8, in <module>
    sys.exit(main())
  File "/home/u26/adamraikes/.conda/envs/qctools/lib/python3.10/site-packages/visualqc/__diffusion__.py", line 12, in main
    diffusion.cli_run()
  File "/home/u26/adamraikes/.conda/envs/qctools/lib/python3.10/site-packages/visualqc/diffusion.py", line 1530, in cli_run
    wf = make_workflow_from_user_options()
  File "/home/u26/adamraikes/.conda/envs/qctools/lib/python3.10/site-packages/visualqc/diffusion.py", line 1497, in make_workflow_from_user_options
    disable_outlier_detection = check_outlier_params(
  File "/home/u26/adamraikes/.conda/envs/qctools/lib/python3.10/site-packages/visualqc/utils.py", line 988, in check_outlier_params
    raise NotImplementedError(
NotImplementedError: Outlier detection based on current source of features (diffusion_mri) is not implemented.
 Allowed: ('freesurfer', 't1_mri', 'dvars')  
(qctools) [adamraikes@gpu68 app_apoe]$ visualqc_diffusion -b nifti_datalad -o visualqc --disable-outlier-detection

Diffusion MRI module
Time stamp : 2023-10-20 08:49:55

version info: visualqc 0.6.6
numpy 1.26.1 / scipy 1.11.3 / matplotlib 3.8.0
python 3.10.12 | packaged by conda-forge | (main, Jun 23 2023, 22:40:32) [GCC 12.3.0]
platform Linux-3.10.0-1160.92.1.el7.x86_64-x86_64-with-glibc2.17
#1 SMP Tue Jun 20 11:48:01 UTC 2023


	Linux distribution: {'NAME': 'CentOS Linux', 'ID': 'centos', 'PRETTY_NAME': 'CentOS Linux 7 (Core)', 'VERSION': '7 (Core)', 'ID_LIKE': 'rhel fedora', 'VERSION_ID': '7', 'ANSI_COLOR': '0;31', 'CPE_NAME': 'cpe:/o:centos:centos:7', 'HOME_URL': 'https://www.centos.org/', 'BUG_REPORT_URL': 'https://bugs.centos.org/', 'CENTOS_MANTISBT_PROJECT': 'CentOS-7', 'CENTOS_MANTISBT_PROJECT_VERSION': '7', 'REDHAT_SUPPORT_PRODUCT': 'centos', 'REDHAT_SUPPORT_PRODUCT_VERSION': '7'}
usage: visualqc_diffusion [-h] [-b BIDS_DIR] [-o OUT_DIR] [-i ID_LIST] [-n NAME_PATTERN] [-ap] [-dl DELAY_IN_ANIMATION] [-vt {Align_b0_edges}] [-olm OUTLIER_METHOD] [-olf OUTLIER_FRACTION] [-olt OUTLIER_FEAT_TYPES] [-old]
                          [-w VIEWS [VIEWS ...]] [-s NUM_SLICES] [-r NUM_ROWS] [-p] [-so]
visualqc_diffusion: error: unrecognized arguments: --disable-outlier-detection
(qctools) [adamraikes@gpu68 app_apoe]$ visualqc_diffusion -b nifti_datalad -o visualqc -old                       

Diffusion MRI module
Time stamp : 2023-10-20 08:50:07

version info: visualqc 0.6.6
numpy 1.26.1 / scipy 1.11.3 / matplotlib 3.8.0
python 3.10.12 | packaged by conda-forge | (main, Jun 23 2023, 22:40:32) [GCC 12.3.0]
platform Linux-3.10.0-1160.92.1.el7.x86_64-x86_64-with-glibc2.17
#1 SMP Tue Jun 20 11:48:01 UTC 2023


	Linux distribution: {'NAME': 'CentOS Linux', 'ID': 'centos', 'PRETTY_NAME': 'CentOS Linux 7 (Core)', 'VERSION': '7 (Core)', 'ID_LIKE': 'rhel fedora', 'VERSION_ID': '7', 'ANSI_COLOR': '0;31', 'CPE_NAME': 'cpe:/o:centos:centos:7', 'HOME_URL': 'https://www.centos.org/', 'BUG_REPORT_URL': 'https://bugs.centos.org/', 'CENTOS_MANTISBT_PROJECT': 'CentOS-7', 'CENTOS_MANTISBT_PROJECT_VERSION': '7', 'REDHAT_SUPPORT_PRODUCT': 'centos', 'REDHAT_SUPPORT_PRODUCT_VERSION': '7'}
Input folder: /xdisk/adamraikes/app_apoe/nifti_datalad
Output folder: /xdisk/adamraikes/app_apoe/visualqc
outlier detection: disabled, as requested.

Restoring ratings from previous session(s), if they exist ..
To be reviewed : 45

Traceback (most recent call last):
  File "/home/u26/adamraikes/.conda/envs/qctools/bin/visualqc_diffusion", line 8, in <module>
    sys.exit(main())
  File "/home/u26/adamraikes/.conda/envs/qctools/lib/python3.10/site-packages/visualqc/__diffusion__.py", line 12, in main
    diffusion.cli_run()
  File "/home/u26/adamraikes/.conda/envs/qctools/lib/python3.10/site-packages/visualqc/diffusion.py", line 1531, in cli_run
    wf.run()
  File "/home/u26/adamraikes/.conda/envs/qctools/lib/python3.10/site-packages/visualqc/workflows.py", line 97, in run
    self.prepare_UI()
  File "/home/u26/adamraikes/.conda/envs/qctools/lib/python3.10/site-packages/visualqc/diffusion.py", line 432, in prepare_UI
    self.open_figure()
  File "/home/u26/adamraikes/.conda/envs/qctools/lib/python3.10/site-packages/visualqc/diffusion.py", line 526, in open_figure
    self.stats_axes[0].get_shared_x_axes().join(self.ax_carpet.xaxis,
AttributeError: 'GrouperView' object has no attribute 'join'. Did you mean: 'joined'?

@raamana
Copy link
Owner

raamana commented Oct 20, 2023

thanks Adam - this is an issue due to deprecations not being handled, at

self.stats_axes[0].get_shared_x_axes().join(self.ax_carpet.xaxis,

regarding the attribute error, there is some confusion whether the .join() method for https://matplotlib.org/stable/api/cbook_api.html#matplotlib.cbook.Grouper is deprecated or not? I will test it locally and find a fix that would work on newer versions of python.

@raamana
Copy link
Owner

raamana commented Oct 20, 2023

trying to get advice from the maintainers before implementing a dirty workaround

@raamana
Copy link
Owner

raamana commented Oct 21, 2023

Hi Adam, I fixed this issue, but dont want to release it yet as you might encounter other issues etc. would you be so kind to install it directly from github master (including the commits from today) in dev/editable mode with pip install -e . (after fork/clone or a simple download) and try it? thanks.

@araikes
Copy link
Author

araikes commented Oct 22, 2023

Yep. I'll test it when I have free time at the end of the coming week.

@araikes
Copy link
Author

araikes commented Oct 26, 2023

That fixes the issue with not running the diffusion workflow with the Python 3.10

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants