commot.pl.plot_cluster_communication_dotplot
- commot.pl.plot_cluster_communication_dotplot(adata, database_name=None, pathway_name=None, clustering=None, lr_pair=None, keys=None, show_pathway_name=False, p_value_cutoff=0.05, p_value_vmin=0.001, size_max=20, size_min=10, vmax_quantile=0.99, vmin_quantile=0.0, cmap='cool', filename=None, font_scale=0.5, top_nclus=- 1, top_ncomm=- 1, cluster_x=False, cluster_y=False, cluster_knn=5, cluster_res=1.0)
Plot cluster-cluster communication through multiple ligand-receptor pairs as dotplot.
- Parameters
adata (
AnnData
) – The data matrix of shapen_obs
×n_var
after runningtl.spatial_communication
. Rows correspond to cells or positions and columns to genes.pathway_name (
Optional
[str
]) – Name of the signaling pathway.clustering (
Optional
[str
]) – Name of the clustering.lr_pair – A tuple of ligand name and receptor name. If None, the total communication of the pathway will be plotted.
keys – A list of keys for the vector field as tuples (pathway_name, ligand, receptor). If given, pathway_name and lr_pair will be ignored. If more than one is given, the average will be plotted.
show_pathway_name (
bool
) – Whether to show pathway_name in yticks.p_value_cutoff (
float
) – Cutoff for being considered significant.p_value_vmin (
float
) – The lower bound of p-value corresponding to the biggest dot size.size_max – Size of biggest dot (corresponding to p-value <= p_value_min).
size_min – Size of smallest dot (corresponding to p-value = p_value_cutoff).
vmax_quantile – The quantile of cluster-cluster communication weights for setting vmax of colormap.
vmin_quantile – The quantile of cluster-cluster communication weights for setting vmin of colormap.
cmap – The colormap for the nodes.
filename – Filename for saving the figure. Set the name to end with ‘.pdf’ or ‘png’ to specify format.
font_scale – Font size.
top_nclus – If not -1, the top number of cluster-cluster pairs with the highest total communication weight among the signaling pathways are plotted.
top_ncomm – If not -1, the top number of ligand-recepter pairs with the highest total communication weight among the cluster-cluster pairs are plotted.
cluster_x – Whether to reorder the cluster-cluster pairs according to their patterns among the ligand-receptor pairs.
cluster_y – Whether to reorder the ligand-receptor pairs according to their patterns among the cluster-cluster pairs.
cluster_knn – The k value of knn graph for clustering if cluster_x or cluster_y is True.
cluster_res – The resolution of leiden clustering algorithm if cluster_x or cluster_y is True.