This function computes the specificity of activity of each gene set activation mode among groups of cells that are determined by a given annotation.The specificity scores is comprised between 0 and 1, and the sum of activities across clusters is 1. If a module is active only in one cluster, the specificity for this cluster will be 1 and 0 for the others.

specificity_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 specificity for.

Value

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