devil
is a package to perform differential expression analysis for scRNA-seq dataset considering either single- or multi-patients experimental designs
You can install the development version of devil
from GitHub with:
devtools::install_github("caravagnalab/devil")
This is a basic example which shows you how to fit the expression for a single gene observed in 1000 cells.
library(devil)
y <- t(as.matrix(rnbinom(1000, 1, .1)))
fit <- devil::fit_devil(input_matrix=y, design_matrix=matrix(1, ncol = 1, nrow = 1000), verbose=T, size_factors=T, overdispersion = T)
#> Compute size factors
#> Skipping size factor estimation! Only one gene is present!
#> Initialize beta estimate
#> Fit beta coefficients
#> Fit overdispersion
test <- devil::test_de(fit, c(1))