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,
  ...
)

Arguments

data

matrix, features in row and samples in column

label

a vector of group label

n

integer, number of returned top genes for each group

use.glm

logical, if to use stats::glm() to compute group mean score, if TRUE, also compute mean score difference as output

batch

a vector of batch labels, default NULL

scale

logical, if to scale data by row

use.mgm

logical, if to scale data using scale_mgm()

softmax

logical, if to apply softmax transformation on output

...

params for top_markers_abs() or top_markers_glm()

Value

a tibble with feature names, group labels and ordered processed scores

Examples

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