From c2ede448d705b9dac4ac495d71f364785ad7eebc Mon Sep 17 00:00:00 2001 From: Cameron Smith Date: Tue, 17 Sep 2024 01:30:28 -0400 Subject: [PATCH] fix(plots): optionally force recomputation of volcano data Signed-off-by: Cameron Smith --- src/pyrovelocity/plots/_genes.py | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/src/pyrovelocity/plots/_genes.py b/src/pyrovelocity/plots/_genes.py index e0c577074..e3de4ffab 100644 --- a/src/pyrovelocity/plots/_genes.py +++ b/src/pyrovelocity/plots/_genes.py @@ -54,17 +54,18 @@ def plot_gene_ranking( defaultfontsize=7, show_xy_labels: bool = False, truncate_lower_mae_percentile: float = 0.0, + recompute_volcano_data: bool = False, ) -> Tuple[DataFrame, Optional[FigureBase]]: if putative_marker_genes is not None: volcano_data: DataFrame = posterior_samples["gene_ranking"] genes = putative_marker_genes - elif "u" in posterior_samples: + elif "u" in posterior_samples or recompute_volcano_data: volcano_data, genes = compute_volcano_data( - posterior_samples, - adata, - time_correlation_with, - putative_marker_genes, - negative, + posterior_samples=posterior_samples, + adata=adata, + time_correlation_with=time_correlation_with, + selected_genes=putative_marker_genes, + negative=negative, ) else: volcano_data: DataFrame = posterior_samples["gene_ranking"]