R/top_markers.R
top_markers_abs.Rd
calculate group median, MAD or mean score and order genes based on scores
top_markers_abs(
data,
label,
n = 10,
pooled.sd = FALSE,
method = c("median", "mad", "mean"),
scale = TRUE,
use.mgm = TRUE,
softmax = TRUE,
tau = 1
)
matrix, features in row and samples in column
a vector of group label
integer, number of returned top genes for each group
logical, if to use pooled SD for scaling
character, specify metric to compute, can be one of "median", "mad", "mean"
logical, if to scale data by row
logical, if to scale data using scale_mgm()
logical, if to apply softmax transformation on output
numeric, hyper parameter for softmax
a tibble with feature names, group labels and ordered processed scores
data <- matrix(rgamma(100, 2), 10, dimnames = list(1:10))
top_markers_abs(data, label = rep(c("A", "B"), 5))
#> # A tibble: 20 × 3
#> # Groups: .dot [2]
#> .dot Genes Scores
#> <chr> <chr> <dbl>
#> 1 A 8 0.282
#> 2 A 4 0.101
#> 3 A 3 0.0979
#> 4 A 7 0.0835
#> 5 A 5 0.0795
#> 6 A 10 0.0778
#> 7 A 2 0.0745
#> 8 A 1 0.0729
#> 9 A 9 0.0664
#> 10 A 6 0.0643
#> 11 B 1 0.151
#> 12 B 9 0.137
#> 13 B 4 0.123
#> 14 B 3 0.119
#> 15 B 6 0.0977
#> 16 B 5 0.0911
#> 17 B 10 0.0862
#> 18 B 7 0.0848
#> 19 B 2 0.0647
#> 20 B 8 0.0462