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     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