R/top_markers.R
top_markers_glm.Rdcalculate group mean score using glm and order genes based on scores difference
top_markers_glm(
data,
label,
n = 10,
family = gaussian(),
batch = NULL,
scale = TRUE,
use.mgm = TRUE,
pooled.sd = FALSE,
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
family for glm, details in stats::glm()
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 use pooled SD for scaling
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_glm(data, label = rep(c("A", "B"), 5))
#> # A tibble: 20 × 3
#> # Groups: .dot [2]
#> .dot Genes Scores
#> <chr> <chr> <dbl>
#> 1 A X7 0.179
#> 2 A X4 0.167
#> 3 A X2 0.159
#> 4 A X8 0.111
#> 5 A X1 0.100
#> 6 A X5 0.0887
#> 7 A X6 0.0629
#> 8 A X3 0.0575
#> 9 A X10 0.0384
#> 10 A X9 0.0369
#> 11 B X9 0.201
#> 12 B X10 0.194
#> 13 B X3 0.129
#> 14 B X6 0.118
#> 15 B X5 0.0838
#> 16 B X1 0.0741
#> 17 B X8 0.0668
#> 18 B X2 0.0469
#> 19 B X4 0.0446
#> 20 B X7 0.0415