R/top_markers.R
top_markers_init.Rdcompute 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 X7 0.202
#> 2 A X10 0.174
#> 3 A X6 0.142
#> 4 A X3 0.127
#> 5 A X5 0.0823
#> 6 A X2 0.0782
#> 7 A X8 0.0713
#> 8 A X9 0.0687
#> 9 A X1 0.0351
#> 10 A X4 0.0187
#> 11 B X4 0.332
#> 12 B X1 0.177
#> 13 B X9 0.0904
#> 14 B X8 0.0871
#> 15 B X2 0.0794
#> 16 B X5 0.0754
#> 17 B X3 0.0488
#> 18 B X6 0.0436
#> 19 B X10 0.0356
#> 20 B X7 0.0308