Plot ligand-gene downstream regulatory relationships as a heatmap.
plot_ligand_targets_heatmap.Rd
Visualizes the NicheNet database to show regulatory relationships between a ligand and the genes they are regulating.
Usage
plot_ligand_targets_heatmap(
adata,
ligand_target_matrix,
velocity_cluster,
colorscale = "cividis",
n_top_ligands = 5,
n_top_genes = 10,
filename = "ligand_target_heatmap.png",
figsize = None,
return_plot = True,
rescale = False,
coord_flip = True
)
Arguments
- adata
Anndata object that has been analyzed with python function
get_velocity_ligands
- ligand_target_matrix
NicheNet database
- velocity_cluster
String, the velocity cluster to visualize ligand-gene targets for. Only one velocity cluster can be visualized at at time.
- colorscale
Name of a color palette to be passed to
seaborn
. Defaultcividis
- n_top_ligands
Number of top ranked ligands to visualize. Default 5.
- n_top_genes
Number of top target genes to visualize for each ligand. Default 10.
- filename
Filename to save as. Default
"ligand_target_heatmap.png"
- figsize
Tuple to pass to matplotlib
figure()
. Default(10, 4)
.- return_plot
Boolean. If
True
, returns a matplotlibax
object.- rescale
Boolean. If
True
, rescales all regulatory potentials between 0 and 1 for each ligand. DefaultFalse
because regulatory potentials are already normalized.- coord_flip
Flips the x-y axis. Default
True.