commot.tl.communication_deg_detection

commot.tl.communication_deg_detection(adata, n_var_genes=None, var_genes=None, database_name=None, pathway_name=None, summary='receiver', lr_pair=('total', 'total'), nknots=6, n_deg_genes=None, n_points=50, deg_pvalue_cutoff=0.05)

Identify signaling dependent genes

adata

The data matrix of shape n_obs × n_var. Rows correspond to cells or positions and columns to genes. The count data should be available through adata.layers[‘count’]. The signaling data should be available in adata.obsm[‘commot-$pathway_name-sum’][‘$summary-$ligand-$receptor’]

n_var_genes

The number of most variable genes to test.

var_genes

The genes to test. n_var_genes will be ignored if given.

n_deg_genes

The number of top deg genes to evaluate yhat.

pathway_name

Name of the signaling pathway.

summary

‘sender’ or ‘receiver’

lr_pair

A tuple of the ligand-receptor pair

nknots

Number of knots in spline when constructing GAM

n_points

Number of points on which to evaluate the fitted GAM for downstream clustering and visualization.

deg_pvalue_cutoff

The p-value cutoff of genes for obtaining the fitted gene expression patterns.

Returns

  • df_deg (pd.DataFrame) – A data frame of deg analysis results, including Wald statistics, degree of freedom, and p-value.

  • df_yhat (pd.DataFrame) – A data frame of smoothed gene expression values.