View source: R/rank_invariance.R
| rank_invariance | R Documentation | 
This function computes the Rank Invariance value for each gene, from the cell
and group ranks  computed by rank_cells() and rank_group() respectively.
Genes with high RI values are considered good candidate TREGs.
rank_invariance(group_rank, cell_rank)
| group_rank | A  | 
| cell_rank | A  | 
A numeric() with the rank of invariance for each gene. High values
represent low Rank Invariance, these genes are considered good candidate TREGs.
Other invariance functions: 
rank_cells(),
rank_group(),
rank_invariance_express()
## Get the rank of the gene in each group
group_rank_test <- rank_group(sce_zero_test, group_col = "group")
## Get the rank of the gene for each cell
cell_rank_test <- rank_cells(sce_zero_test, group_col = "group")
## Use both rankings to calculate rank_invariance
rank_invar_test <- rank_invariance(group_rank_test, cell_rank_test)
## Highest RI value is best candidate TREG
sort(rank_invar_test, decreasing = TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.