select markers using mixtools EM method

markers_mixmdl(
  top_markers,
  column = ".dot",
  prob = 0.99,
  k = 3,
  ratio = 2,
  dist = c("norm", "gamma"),
  maxit = 1e+05,
  plot = FALSE,
  ...
)

Arguments

top_markers

output of top_markers()

column

character, specify which column used as group label

prob

numeric, probability cutoff for 1st component classification

k

integer, number of components of mixtures

ratio

numeric, ratio cutoff of 1st component mu to 2nd component mu, only when ratio > cutoff will return markers for the group

dist

can be one of "norm" and "gamma", specify if to use mixtools::normalmixEM() or mixtools::gammamixEM()

maxit

integer, maximum number of iterations for EM

plot

logical, if to plot mixture density and hist

...

other params for mixtools::normalmixEM() or mixtools::gammamixEM()

Value

a list of markers for each group

Examples

set.seed(1000)
data <- matrix(rnorm(100), 10, dimnames = list(1:10))
top_n <- top_markers(data, label = rep(c("A", "B"), 5))
markers_mixmdl(top_n, k = 3)
#> One of the variances is going to zero;  trying new starting values.
#> One of the variances is going to zero;  trying new starting values.
#> One of the variances is going to zero;  trying new starting values.
#> One of the variances is going to zero;  trying new starting values.
#> One of the variances is going to zero;  trying new starting values.
#> One of the variances is going to zero;  trying new starting values.
#> One of the variances is going to zero;  trying new starting values.
#> One of the variances is going to zero;  trying new starting values.
#> One of the variances is going to zero;  trying new starting values.
#> One of the variances is going to zero;  trying new starting values.
#> number of iterations= 15 
#> number of iterations= 69 
#> $A
#> NULL
#> 
#> $B
#> NULL
#>