This function computes the homogeneity of activity of each gene set activation mode among groups of cells that are determined by a given annotation.The homogeneity scores is comprised between 0 and 1, 1 corresponding to a highly homogeneous activity among cells from this given cluster. The standard deviation of the scores for this module and cluster is compared with the standard deviation of a distribution with the same number of observations but with half values equal to 0 and the other half equals to 1 (worse possible distribution in terms of homogeneity). Careful, if the module is inactive in all cells, it will be highly homogeneous, homogeneity is not linked to the level of activation.

homogeneity_table(activity_mat, meta, annot_name)

Arguments

activity_mat

Numeric matrix, output from compute_activity function.

meta

Dataframe containing metadata, with cell labels as rownames.

annot_name

Character, name of the column in meta that should be used to compute homogeneity for.

Value

Dataframe containing homogeneity score for each cluster for each row of the activity matrix.