Skip to content

Commit

Permalink
fix(summary): support selected genes and marginal histograms
Browse files Browse the repository at this point in the history
Signed-off-by: Cameron Smith <cameron.ray.smith@gmail.com>
  • Loading branch information
cameronraysmith committed Mar 20, 2024
1 parent cf37f8e commit 8d38ccd
Showing 1 changed file with 15 additions and 2 deletions.
17 changes: 15 additions & 2 deletions src/pyrovelocity/plots/_summary.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import anndata
import matplotlib.pyplot as plt

from pyrovelocity.logging import configure_logging
Expand All @@ -13,7 +14,14 @@


def summarize_fig2_part2(
adata, posterior_samples, plot_name="", basis="", cell_state="", fig=None
adata: anndata.AnnData,
posterior_samples,
plot_name: str = "",
basis: str = "",
cell_state: str = "",
fig=None,
show_marginal_histograms: bool = False,
selected_genes=None,
):
if fig is None:
fig = plt.figure(figsize=(9.5, 5))
Expand All @@ -30,7 +38,12 @@ def summarize_fig2_part2(
basis=basis,
)
volcano_data, _ = plot_gene_ranking(
[posterior_samples], [adata], ax=ax[1], time_correlation_with="st"
[posterior_samples],
[adata],
ax=ax[1],
time_correlation_with="st",
selected_genes=selected_genes,
show_marginal_histograms=show_marginal_histograms,
)
_ = rainbowplot(
volcano_data,
Expand Down

0 comments on commit 8d38ccd

Please sign in to comment.