R/top_markers.R
top_markers_init.Rd
compute group summarized score and order genes based on processed scores
top_markers_init(
data,
label,
n = 10,
use.glm = TRUE,
batch = NULL,
scale = TRUE,
use.mgm = TRUE,
softmax = TRUE,
...
)
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 stats::glm()
to compute group mean score,
if TRUE, also compute mean score difference as output
a vector of batch labels, default NULL
logical, if to scale data by row
logical, if to scale data using scale_mgm()
logical, if to apply softmax transformation on output
params for top_markers_abs()
or top_markers_glm()
a tibble with feature names, group labels and ordered processed scores
data <- matrix(rgamma(100, 2), 10, dimnames = list(1:10))
top_markers_init(data, label = rep(c("A", "B"), 5))
#> # A tibble: 20 × 3
#> # Groups: .dot [2]
#> .dot Genes Scores
#> <chr> <chr> <dbl>
#> 1 A X5 0.206
#> 2 A X9 0.196
#> 3 A X4 0.165
#> 4 A X1 0.101
#> 5 A X8 0.0970
#> 6 A X2 0.0691
#> 7 A X7 0.0489
#> 8 A X6 0.0465
#> 9 A X3 0.0416
#> 10 A X10 0.0288
#> 11 B X10 0.229
#> 12 B X3 0.159
#> 13 B X6 0.142
#> 14 B X7 0.135
#> 15 B X2 0.0956
#> 16 B X8 0.0681
#> 17 B X1 0.0651
#> 18 B X4 0.0400
#> 19 B X9 0.0337
#> 20 B X5 0.0321