Description Usage Arguments Value Author(s) Examples
This function preprocesses a fit object returned from eBayes to include only the values relevant to the
modelTerm
specified.
1 | ct.preprocessFit(fit, modelTerm)
|
fit |
An object of class MArrayLM to be processed. |
modelTerm |
The model coefficient to be isolated for downstream analyses. |
A MArrayLM
object for downstream processing.
Russell Bainer
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 | #Load and preprocess data
data('es')
library(Biobase)
library(limma)
#Make a multi-level contrast
design <- model.matrix(~ 0 + TREATMENT_NAME, pData(es))
colnames(design) <- gsub('TREATMENT_NAME', '', colnames(design))
contrasts <- makeContrasts((ControlExpansion - ControlReference), (DeathExpansion - ControlExpansion), levels = design)
#Make a multi-level fit object
vm <- voom(exprs(es), design)
fit <- lmFit(vm, design)
fit <- contrasts.fit(fit, contrasts)
fit <- eBayes(fit)
#And trim it
fit2 <- ct.preprocessFit(fit, modelTerm = '(DeathExpansion - ControlExpansion)')
ncol(fit)
ncol(fit2)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.