This function computes the Rank Invariance value for each gene, over the groups defined by the user. This function computes the same RI values as running rank_cells() + rank_group() + rank_invariance(). Genes with high RI values are considered good candidate TREGs. This function is more efficient than running the previous three functions.

rank_invariance_express(sce, group_col = "cellType", assay = "logcounts")

Arguments

sce

SummarizedExperiment-class object with the assay (defaults to logcounts).

group_col

name of the column in the colData() of sce that defines the group of interest.

assay

A character(1) specifying the name of the assay() in the sce object to use to rank expression values. Defaults to logcounts since it typically contains the normalized expression values.

Value

A numeric() with the rank of invariance for each gene. High values represent low Rank Invariance, these genes are considered good candidate TREGs.

See also

Other invariance functions: rank_cells(), rank_group(), rank_invariance()

Examples

## Calculate RI for the sce object
## Highest RI value is best candidate TREG, and can change based on the grouping of interest
rank_invariance_express(sce_zero_test, group_col = "group")
#>   g100    g50     g0 gOffOn   gVar 
#>      3      4      5      1      2 
rank_invariance_express(sce_zero_test, group_col = "cellType")
#>   g100    g50     g0 gOffOn   gVar 
#>      4      2      5      2      2