CBICA / niCHART

The neuro-imaging brain aging chart [niCHART] is a comprehensive solution to analyze standard structural and functional brain MRI data across studies. [niCHART] and the associated pre-processing tools implement computational morphometry, functional signal analysis, quality control, statistical harmonization, data standardization, interactive visual
https://cbica.github.io/niCHART/
Other
13 stars 8 forks source link

Add figure of harmonization parameters #125

Closed melhemr closed 2 years ago

melhemr commented 2 years ago

This will add a scrollable table of harmonization parameters to the Harmonization tab

melhemr commented 2 years ago

To do:

AbdulkadirA commented 2 years ago

@melhemr Instead of showing the parameters for all ROIs in the table, how about only showing those for that specific ROI? This could be written into the site label, e.g.

ABC; N=106; g=-0.11; d=0.89
ADNI1; N=234; g=0.09; d=0.97
...
AbdulkadirA commented 2 years ago

@melhemr Although the PR is not ready, I quickly ran the code and got following error message. Hope this is useful.

Traceback (most recent call last):
  File "c:\users\[REDACTED]\istaging-tools\QtBrainChartGUI\plugins\harmonization\harmonization.py", line 190, in UpdatePlot
    self.plotMUSE(plotOptions)
  File "c:\users\[REDACTED]\istaging-tools\QtBrainChartGUI\plugins\harmonization\harmonization.py", line 288, in plotMUSE
    a.set_yticklabels(labels)
  File "C:\Users\[REDACTED]\iSTAGING-Tools\.env\lib\site-packages\matplotlib\axes\_base.py", line 73, in wrapper
    return get_method(self)(*args, **kwargs)
  File "C:\Users\[REDACTED]\iSTAGING-Tools\.env\lib\site-packages\matplotlib\_api\deprecation.py", line 471, in wrapper
    return func(*args, **kwargs)
  File "C:\Users\[REDACTED]\iSTAGING-Tools\.env\lib\site-packages\matplotlib\axis.py", line 1790, in _set_ticklabels
    return self.set_ticklabels(labels, minor=minor, **kwargs)
  File "C:\Users\[REDACTED]\iSTAGING-Tools\.env\lib\site-packages\matplotlib\axis.py", line 1711, in set_ticklabels
    raise ValueError(
ValueError: The number of FixedLocator locations (20), usually from a call to set_ticks, does not match the number of ticklabels (17).
melhemr commented 2 years ago

@AbdulkadirA, if you know of a way to call the exact y-coordinate of an axis that uses categories (e.g. site), I would appreciate it. I've been trying to figure out how to lift the g=, d= text slightly up so that it doesn't intersect with the data point.

AbdulkadirA commented 2 years ago

@AbdulkadirA, if you know of a way to call the exact y-coordinate of an axis that uses categories (e.g. site), I would appreciate it. I've been trying to figure out how to lift the g=, d= text slightly up so that it doesn't intersect with the data point.

How about setting ylim to the same values as in the other axes? Also linking axes should help: https://datavizpyr.com/seaborn-join-two-plots-with-shared-y-axis/

melhemr commented 2 years ago

@AbdulkadirA, if you know of a way to call the exact y-coordinate of an axis that uses categories (e.g. site), I would appreciate it. I've been trying to figure out how to lift the g=, d= text slightly up so that it doesn't intersect with the data point.

How about setting ylim to the same values as in the other axes? Also linking axes should help: https://datavizpyr.com/seaborn-join-two-plots-with-shared-y-axis/

@AbdulkadirA thanks! I was able to fix the alignment of the parameter plot to match the other two