R/rank_group.R
rank_group.Rd
This function finds the rank of each gene's mean expression all cells in a
group. This data is used to compute the rank invariance value for each gene
later with rank_invariance()
.
rank_group(sce, group_col = "cellType", assay = "logcounts")
SummarizedExperiment-class object with
the assay
(defaults to logcounts
).
name of the column in the
colData() of sce
that defines the group of interest.
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.
Named list()
of ranks for each gene.
Other invariance functions:
rank_cells()
,
rank_invariance_express()
,
rank_invariance()
## Rank the genes for each group defined by "group" column
rank_group(sce_zero_test, group_col = "group")
#> $A_Back
#> g100 g50 g0 gOffOn gVar
#> 1.0 3.5 5.0 2.0 3.5
#>
#> $A_Front
#> g100 g50 g0 gOffOn gVar
#> 1 3 5 4 2
#>
#> $B_Back
#> g100 g50 g0 gOffOn gVar
#> 1 3 5 2 4
#>
#> $B_Front
#> g100 g50 g0 gOffOn gVar
#> 1.0 2.0 5.0 3.5 3.5
#>