ct.preprocessFit: Preprocess a "MArrayLM" model fit object to include only one...

Description Usage Arguments Value Author(s) Examples

View source: R/processFit.R

Description

This function preprocesses a fit object returned from eBayes to include only the values relevant to the modelTerm specified.

Usage

1
ct.preprocessFit(fit, modelTerm)

Arguments

fit

An object of class MArrayLM to be processed.

modelTerm

The model coefficient to be isolated for downstream analyses.

Value

A MArrayLM object for downstream processing.

Author(s)

Russell Bainer

Examples

 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)

gCrisprTools documentation built on Nov. 8, 2020, 8:17 p.m.