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, ax=None, time_correlation_with='s', selected_genes=None, assemble=False, negative=False, show_marginal_histograms=False, save_volcano_plot=False, volcano_plot_path='volcano.pdf')

plot_parameter_posterior_distributions

pyrovelocity.plots.plot_parameter_posterior_distributions(posterior_samples, adata, geneset, parameter_uncertainty_plot, parameter_names=['alpha', 'beta', 'gamma', 'u_offset', 's_offset', 't0'])

plot_posterior_time

pyrovelocity.plots.plot_posterior_time(posterior_samples, adata, ax=None, fig=None, basis='umap', addition=True, position='left', s=3)

plot_shared_time_uncertainty

pyrovelocity.plots.plot_shared_time_uncertainty(posterior_samples, adata, vector_field_basis, shared_time_plot)

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, scvelo_colors=False, save_plot=False, show_data=True, rainbow_plot_path='rainbow.pdf')

plot_vector_field_summary

pyrovelocity.plots.plot_vector_field_summary(adata, posterior_samples, vector_field_basis, plot_name, cell_state='cell_type')

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)