Calculate the mean ratio value and rank for each gene for each cell type in the sce
object, to identify effective marker genes for deconvolution.
get_mean_ratio2(
sce,
cellType_col = "cellType",
assay_name = "logcounts",
add_symbol = TRUE
)
SummarizedExperiment-class object
A character(1)
name of the column in the
colData() of sce
that
denotes the cell type or 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.
a logical indicating whether the gene symbol column to the marker stats table
Table of mean ratio for each x cell type
Improved efficiency and ability to handle large data sets from get_mean_ratio()
.
get_mean_ratio2(sce.test)
#> # A tibble: 1,778 × 9
#> gene cellType.target mean.target cellType mean ratio rank_ratio Symbol
#> <chr> <fct> <dbl> <fct> <dbl> <dbl> <int> <chr>
#> 1 ENSG00000… Inhib.2 1.00 Excit.2 0.239 4.20 1 AL139…
#> 2 ENSG00000… Inhib.2 1.71 Astro 0.512 3.35 2 SDC3
#> 3 ENSG00000… Inhib.2 0.950 Astro 0.413 2.30 3 IFI44
#> 4 ENSG00000… Inhib.2 3.32 Astro 1.47 2.26 4 COL11…
#> 5 ENSG00000… Inhib.2 3.55 Astro 1.62 2.19 5 NTNG1
#> 6 ENSG00000… Inhib.2 1.22 Excit.1 0.560 2.18 6 TRIM62
#> 7 ENSG00000… Inhib.2 3.37 Excit.2 1.96 1.72 7 USP24
#> 8 ENSG00000… Inhib.2 3.42 Inhib.1 2.44 1.40 8 SPATA6
#> 9 ENSG00000… Inhib.2 1.21 Astro 0.914 1.33 9 ABCD3
#> 10 ENSG00000… Inhib.2 1.21 Astro 0.920 1.32 10 GNG12
#> # ℹ 1,768 more rows
#> # ℹ 1 more variable: anno_ratio <chr>