testZeroes {waddR} | R Documentation |
Test for differential proportions of zero expression between two conditions for a specified set of genes
testZeroes(x, y, these = seq_len(nrow(x))) ## S4 method for signature 'matrix,vector,ANY' testZeroes(x, y, these = seq_len(nrow(x))) ## S4 method for signature 'SingleCellExperiment,SingleCellExperiment,vector' testZeroes(x, y, these = seq_len(nrow(x)))
x |
matrix of single-cell RNA-sequencing expression data with genes in rows and samples (cells) in columns |
y |
vector of condition labels |
these |
vector of row numbers (i.e. gene numbers) employed to test for differential proportions of zero expression. Default is seq_len(nrow(dat)) |
Test for differential proportions of zero expression between two conditions that is not explained by the detection rate using a (Bayesian) logistic regression model. Adapted from the scDD package (Korthauer et al. 2016).
A vector of (unadjusted) p-values
Korthauer et al. (2016).
x1 <- c(rnorm(100,42,1), rnorm(102,45,3)) x2 <- c(rnorm(100,0,1), rnorm(102,0,2)) dat <- matrix(c(x1,x2), nrow=2, byrow=TRUE) condition <- c(rep(1,100), rep(2,102)) # test over all rows testZeroes(dat, condition) # only consider the second row testZeroes(dat, condition, these=c(2))