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

Fixed plotting for mixscape.plot_barplot and sccoda.plot_effects_barplot #667

Merged
merged 1 commit into from
Oct 11, 2024

Conversation

Lilly-May
Copy link
Collaborator

PR Checklist

Description of changes

mixscape.plot_barplot issue
As reported in #659, the effects bar plot wasn't visible. Adding a simple plt.tight_layout() fixed the issue. I also resolved some warnings that occurred during plotting by using ax.set_xticks instead of ax.set_xticklabels.

sccoda.plot_effects_barplot
Reported in #598 and theislab/single-cell-best-practices#271.
These issues were basically reporting the same problem: there was a bug in the code that caused covariates with only zero effects to be filtered out of the plotting dataframe, even when the plot_zero_covariate parameter was set to True (which is the default). This also led to incorrect figure titles. I resolved the issue by removing the line of code causing the bug.

For these results:
Bildschirmfoto 2024-10-11 um 11 20 18

So far, the generated plot looked like this (one plot missing, wrong titles):
Bildschirmfoto 2024-10-11 um 11 20 49

NOW, i.e. after merging this PR, it will look like this:
Bildschirmfoto 2024-10-11 um 11 21 22
Bildschirmfoto 2024-10-11 um 11 21 55

@github-actions github-actions bot added the bug Something isn't working label Oct 11, 2024
@codecov-commenter
Copy link

codecov-commenter commented Oct 11, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 65.56%. Comparing base (98e2bdb) to head (b8b3a78).

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #667   +/-   ##
=======================================
  Coverage   65.56%   65.56%           
=======================================
  Files          47       47           
  Lines        6105     6105           
=======================================
  Hits         4003     4003           
  Misses       2102     2102           
Files with missing lines Coverage Δ
pertpy/tools/_coda/_base_coda.py 56.30% <ø> (ø)
pertpy/tools/_mixscape.py 79.12% <ø> (ø)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants