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

ENH: Add raincloud plot capabilities #118

Merged
merged 1 commit into from
Jul 2, 2024

Conversation

jhlegarreta
Copy link
Collaborator

Add raincloud plot capabilities and demonstrate on the FA values of computed on a DWI volume across different tissue types.

@jhlegarreta
Copy link
Collaborator Author

Re nipreps/mriqc#1216 (comment)

FA, MD, residuals [2], etc. mean/stddevs, etc. in e.g. in tissues/across subjects

Happy to add. For now we only have degenerate FA voxels in ppm.

@oesteban Would need data to finish this: figure out how scalar maps are provided or how the data would be stored as TSV files from upstream processes (smriprep, dmriprep ?).

@jhlegarreta jhlegarreta force-pushed the AddRaincloudplot branch 15 times, most recently from f470930 to ec97594 Compare May 19, 2024 18:13
Copy link

codecov bot commented May 19, 2024

Codecov Report

Attention: Patch coverage is 87.50000% with 13 lines in your changes missing coverage. Please review.

Project coverage is 59.52%. Comparing base (fcfb226) to head (b8337fb).
Report is 52 commits behind head on main.

Files with missing lines Patch % Lines
nireports/reportlets/nuisance.py 84.93% 5 Missing and 6 partials ⚠️
nireports/interfaces/nuisance.py 92.85% 1 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #118      +/-   ##
==========================================
+ Coverage   57.85%   59.52%   +1.66%     
==========================================
  Files          20       20              
  Lines        2074     2174     +100     
  Branches      365      383      +18     
==========================================
+ Hits         1200     1294      +94     
- Misses        788      789       +1     
- Partials       86       91       +5     
Flag Coverage Δ
unittests 59.36% <87.50%> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@jhlegarreta
Copy link
Collaborator Author

@jhlegarreta jhlegarreta marked this pull request as ready for review May 19, 2024 18:22
@jhlegarreta
Copy link
Collaborator Author

jhlegarreta commented May 19, 2024

@oesteban Adding more customizations to this can be left for separate PRs. Dealing with the kwargs as well (it is uncertain to me how those would be dealt with the interface).

Normal plot

Data contains NaNs (marked as black dots)

Data contains both NaNs (marked as black dots) and off-limit values (marked as gray dots and by the excessive density around the limits -values are clipped, not removed)

@jhlegarreta jhlegarreta force-pushed the AddRaincloudplot branch 2 times, most recently from 9ad12a1 to 487474b Compare May 19, 2024 20:17
Add raincloud plot capabilities and demonstrate on the FA values of
computed on a DWI volume across different tissue types.

Add the corresponding tests.

Add a `utils.py` helper module to the `tests` module. Contains a
function to create random data used by the added tests.
@jhlegarreta
Copy link
Collaborator Author

jhlegarreta commented Jul 2, 2024

@oesteban I am unsure about the relevance of this now, as I have seen that the group reports that you already have available in mriqc are equivalent to these:
https://mriqc.readthedocs.io/en/latest/reports/group.html#group-reports

So if the latter are generated from nireports, then this PR is unfortunately not all that interesting. If they are not, maybe those capabilities should be transferred to nireports and adopt that style instead of introducing a new one here.

@oesteban
Copy link
Member

oesteban commented Jul 2, 2024

I think this can come handy at some point, I can't see a reason to pull it back now :)

@oesteban oesteban merged commit 34bf28c into nipreps:main Jul 2, 2024
22 checks passed
@jhlegarreta jhlegarreta deleted the AddRaincloudplot branch July 2, 2024 13:02
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

Successfully merging this pull request may close these issues.

2 participants