commot.pl.plot_communication_dependent_genes
- commot.pl.plot_communication_dependent_genes(df_deg, df_yhat, show_gene_names=True, top_ngene_per_cluster=- 1, colormap='magma', cluster_colormap='Plotly', font_scale=1.4, filename=None, return_genes=False)
Plot smoothed gene expression of the detected communication-dependent genes. Takes input from
tl.communication_deg_clustering
.- Parameters
df_deg (
DataFrame
) – A data frame where each row is a gene and the columns should include ‘waldStat’, ‘pvalue’, ‘cluster’. Output oftl.communication_deg_clustering
df_yhat (
DataFrame
) – A data frame where each row is the smoothed expression of a gene. Output oftl.communication_deg_clustering
.show_gene_names (
bool
) – Whether to plot the gene names.top_ngene_per_cluster (
int
) – If non-negative, plot the top_ngene_per_cluster genes with highest wald statistics.colormap (
str
) – The colormap for the heatmap. Choose from available colormaps fromseaborn
.cluster_colormap (
str
) – The qualitative colormap for annotating gene cluster labels. Choose from ‘Plotly’, ‘Alphabet’, ‘Light24’, ‘Dark24’.font_scale (
float
) – Font size.filename – Filename for saving the figure. Set the name to end with ‘.pdf’ or ‘png’ to specify format.
return_genes – Whether to return the list of plotted genes.
- Returns
Returns the gene list being plotted if return_genes is True.
- Return type
genes