Skip to contents

Visualize the ligands and their feature importances towards the velocity clusters, in python.

Usage

plot_ligand_importance_heatmap(
  adata,
  n_top_ligands = 5,
  colorscale = "inferno",
  velocity_clusters = None,
  filename = "velocity_importances.png",
  figsize = None,
  rescale_columns = True,
  return_plot = True
)

Arguments

adata

Anndata object that has been analyzed with python function get_velocity_ligands

n_top_ligands

Number of top ligands to visualize. Default 5.

colorscale

Name of a color palette to be passed to seaborn.

velocity_clusters

Character vector of velocity clusters to include in the plot. Default None - include all velocity clusters,

filename

Filename to save as.

figsize

Tuple to pass to matplotlib figure(). Default (10,8)

rescale_columns

Boolean. If TRUE, rescales all ligand importances between 0 and 1. This is recommended because random forest importances are relative.

return_plot

Boolean. If TRUE, returns a matplotlib ax object.

Value

a matplotlib ax object, if return_plot is True.