
"estDispersion"(seqData, trend=FALSE)
With ``trend=TRUE'' the dependence of dispersion on mean expressions will be modeled. In that case the shrinkage will be performed conditional on mean expressions.
The function works for multiple factor designs. But option ``trend=TRUE'' only applicable for single factor experiment.
data(seqData)
seqData=estNormFactors(seqData)
seqData=estDispersion(seqData)
head(dispersion(seqData))
## For multiple factor design
data(seqData)
Y=exprs(seqData)
design=data.frame(gender=c(rep("M",4), rep("F",4)), strain=rep(c("WT", "Mutant"),4))
X=as.data.frame(model.matrix(~gender+strain, data=design))
seqData=newSeqCountSet(Y, X)
seqData=estDispersion(seqData)
head(dispersion(seqData))
## the hypothesis testing for multifactor experiments can be performed
## using edgeR function, with DSS estimated dispersions
## Not run:
# library(edgeR)
# fit.edgeR <- glmFit(Y, X, lib.size=normalizationFactor(seqData), dispersion=dispersion(seqData))
# lrt.edgeR <- glmLRT(fit.edgeR, coef=2)
# head(lrt.edgeR$table)
# ## End(Not run)
Run the code above in your browser using DataLab