commot.tl.communication_deg_clustering
- commot.tl.communication_deg_clustering(df_deg, df_yhat, deg_clustering_npc=10, deg_clustering_knn=5, deg_clustering_res=1.0, n_deg_genes=200, p_value_cutoff=0.05)
Cluster the communcation DE genes based on their fitted expression pattern.
- Parameters
df_deg (
DataFrame) – The deg analysis summary data frame obtained by runningcommunication_deg_detection. Each row corresponds to one tested genes and columns include “waldStat” (Wald statistics), “df” (degrees of freedom), and “pvalue” (p-value of the Wald statistics).df_yhat (
DataFrame) – The fitted (smoothed) gene expression pattern obtained by runningtl.communication_deg_detection.deg_clustering_npc (
int) – Number of PCs when performing PCA to cluster gene expression patternsdeg_clustering_knn (
int) – Number of neighbors when constructing the knn graph for leiden clustering.deg_clustering_res (
float) – The resolution parameter for leiden clustering.n_deg_genes (
int) – Number of top deg genes to cluster.p_value_cutoff (
float) – The p-value cutoff for genes to be included in clustering analysis.
- Returns
df_deg_clus (pd.DataFrame) – A data frame of clustered genes.
df_yhat_clus (pd.DataFrame) – The fitted gene expression patterns of the clustered genes