Add plot_ma for DGE results - #1066
Merged
Merged
Conversation
Closes #969 Closes #803 Adds the pertpy equivalent of edgeR's plotSmear and DESeq2's plotMA: mean expression against the log2 fold change, highlighting the variables the test called significant. Unlike the volcano plot it shows the expression range, so lowly expressed hits are no longer indistinguishable from well expressed ones. The mean column differs per method, so it is detected from the results: baseMean for PyDESeq2 and logCPM for edgeR. The x axis is log scaled for linear mean columns and left alone for those already on a log scale.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #1066 +/- ##
==========================================
+ Coverage 74.15% 78.72% +4.56%
==========================================
Files 52 52
Lines 7291 7290 -1
==========================================
+ Hits 5407 5739 +332
+ Misses 1884 1551 -333
🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #969
Closes #803
Adds
plot_matoMethodBase, the pertpy equivalent of edgeR'splotSmearand DESeq2'splotMA: mean expression against the log2 fold change, highlighting the variables the test called significant.As #803 puts it, the volcano plot carries no information about expression range, so lowly expressed hits are indistinguishable from well expressed ones.
The mean column differs per method, so it is detected from the results —
baseMeanfor PyDESeq2,logCPMfor edgeR — andmean_colcovers anything else.The x-axis is log-scaled for linear mean columns and left alone for those already on a log scale.
Verified end-to-end against both backends, not just the unit tests: PyDESeq2 picks up
baseMeanwith a log x-axis, edgeR picks uplogCPMwith a linear one.The docstring preview is EdgeR on
zhang_2021, the same example the other DGE plots use.