glmTreat(glmfit, coef=ncol(glmfit$design), contrast=NULL, lfc=0) treatDGE(glmfit, coef=ncol(glmfit$design), contrast=NULL, lfc=0)
DGEGLMobject, usually output from
design. Defaults to the last coefficient. Ignored if
design. If specified, then takes precedence over
glmTreatproduces an object of class
DGELRTwith the same components as for
glmfitplus the following:
glmfitcontaining the log2-fold-changes, average log2-counts per million and p-values, ready to be displayed by
tablecontains the following columns:
prior.countis not equal to 0 for
glmTreatimplements a test for differential expression relative to a minimum required fold-change threshold. Instead of testing for genes which have log-fold-changes different from zero, it tests whether the log2-fold-change is greater than
lfcin absolute value.
glmTreatis analogous to the TREAT approach developed by McCarthy and Smyth (2009) for microarrays.
glmTreat detects whether
glmfit was produced by
In the former case, it conducts a modified likelihood ratio test (LRT) against the fold-change threshold.
In the latter case, it conducts a quasi-likelihood (QL) F-test against the threshold.
glmTreat is equivalent to
glmQLFTest, depending on whether likelihood or quasi-likelihood is being used.
If there is no shrinkage on log-fold-changes, i.e., fitting glms with
logFC are essentially the same. Hence they are merged into one column of
glmTreat constructs test statistics using
unshrunk.logFC rather than
glmTreat was previously called
The old function name is now deprecated and will be removed in a future release of edgeR.
topTagsdisplays results from
ngenes <- 100 n1 <- 3 n2 <- 3 nlibs <- n1+n2 mu <- 100 phi <- 0.1 group <- c(rep(1,n1), rep(2,n2)) design <- model.matrix(~as.factor(group)) ### 4-fold change for the first 5 genes i <- 1:5 fc <- 4 mu <- matrix(mu, ngenes, nlibs) mu[i, 1:n1] <- mu[i, 1:n1]*fc counts <- matrix(rnbinom(ngenes*nlibs, mu=mu, size=1/phi), ngenes, nlibs) d <- DGEList(counts=counts,lib.size=rep(1e6, nlibs), group=group) gfit <- glmFit(d, design, dispersion=phi) tr <- glmTreat(gfit, coef=2, lfc=1) topTags(tr)