Plots

The plots package hosts plotting functions supported by Pyro-Velocity.

cluster_violin_plots

pyrovelocity.plots.cluster_violin_plots(data_model, adata, posterior_samples, cluster_key, violin_flag, pairs, show_outlier, fig_name=None)

Construct violin plots for each cluster.

extrapolate_prediction_sample_predictive

pyrovelocity.plots.extrapolate_prediction_sample_predictive(posterior_time, data_model_path, adata, grid_time_points=1000, use_gpu='cpu')

get_posterior_sample_angle_uncertainty

pyrovelocity.plots.get_posterior_sample_angle_uncertainty(posterior_angles)

plot_gene_ranking

pyrovelocity.plots.plot_gene_ranking(posterior_samples, adata, fig=None, ax=None, gs=None, time_correlation_with='s', putative_marker_genes=None, selected_genes=[''], assemble=False, negative=False, show_marginal_histograms=False, save_volcano_plot=False, volcano_plot_path='volcano.pdf', defaultfontsize=7, show_xy_labels=False, truncate_lower_mae_percentile=0.0, recompute_volcano_data=False)

plot_parameter_posterior_distributions

pyrovelocity.plots.plot_parameter_posterior_distributions(posterior_samples, adata, geneset, parameter_names=DEFAULT_PARAMETER_LABEL_MAPPINGS, fig=None, gs=None, save_plot=False, parameter_uncertainty_plot='parameter_uncertainty.pdf', default_fontsize=7, log_base=10, boxplot=False)

plot_posterior_time

pyrovelocity.plots.plot_posterior_time(posterior_samples, adata, ax=None, fig=None, basis='umap', addition=True, position='left', cmap='cividis', s=3, show_colorbar=True, show_titles=True, alpha=1, plot_individual_obs=False)

plot_shared_time_uncertainty

pyrovelocity.plots.plot_shared_time_uncertainty(adata, posterior_samples, vector_field_basis, shared_time_plot, dotsize=None, default_font_size=12, duplicate_title=False, plot_individual_obs=False)

plot_state_uncertainty

pyrovelocity.plots.plot_state_uncertainty(posterior_samples, adata, kde=True, data='denoised', top_percentile=0.9, ax=None, basis='umap')

plot_t0_selection

pyrovelocity.plots.plot_t0_selection(posterior_samples, t0_selection_plot)

Plot the t0, switching time, and cell time posterior samples.

Parameters

Name Type Description Default
posterior_samples Dict[str, np.ndarray] Dictionary of posterior samples. required
t0_selection_plot PathLike | str Path to save the plot. required

Returns

Type Description
FigureBase Matplotlib figure object.

posterior_curve

pyrovelocity.plots.posterior_curve(adata, posterior_samples, gene_set, data_model, model_path, output_directory)

rainbowplot

pyrovelocity.plots.rainbowplot(volcano_data, adata, posterior_samples, fig=None, genes=None, data=['st', 'ut'], cell_state='clusters', basis='umap', num_genes=5, add_line=True, negative_correlation=False, state_info_colors=False, save_plot=False, show_data=True, rainbow_plot_path='rainbow.pdf', default_font_size=7)

plot_vector_field_summary

pyrovelocity.plots.plot_vector_field_summary(adata, posterior_samples, vector_field_basis, plot_name=None, cell_state='cell_type', state_color_dict=None, fig=None, gs=None, default_fontsize=7 if matplotlib.rcParams['text.usetex'] else 6, default_title_padding=5, dotsize=1, scale=0.35, arrow_size=3, density=0.4, save_fig=False, linewidth=0.5, title_background_color='#F0F0F0', force_complete_angular_scale=False)

plot_gene_selection_summary

pyrovelocity.plots.plot_gene_selection_summary(adata, posterior_samples, plot_name='', basis='', cell_state='', show_marginal_histograms=False, selected_genes=None)