TET2: Fit linear models and/or contrasts to data from Figueroe et...

Description Usage Arguments Value Examples

View source: R/TET2.R

Description

Fit linear models and/or contrasts to data from Figueroe et al. 2010.

Usage

1
TET2(eset, design, ...)

Arguments

eset

an ExpressionSet of HELP data (e.g. data(DNAme))

design

a formula for a linear model to fit to the data with limma

...

any other parameters to pass to lmFit (e.g. method="robust")

Value

1
     results from eBayes(lmFit(eset, design, ...))

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
 data(DNAme, package="WorldsSimplestCodeReview")
 covariates <- pData(DNAme) # pData == "pheno-data", a very old function
 library(limma) 

 # let's fit a model with the specified bone marrow blast % (but beware...)
 design <- with(covariates, model.matrix( ~ IDH:purity + TET2:purity + male))
 fitWithPurityAndSex <- TET2(DNAme, design, method="robust")

 # if you look at DNAme$purity, it doesn't make a lot of sense
 # so let's compare against normal bone marrows (NBM) instead:
 DNAme$NBM <- grepl("NBM", DNAme$title) 
 DNAme$AML <- !DNAme$NBM # the non-NBMs are all AMLs 
 design2 <- with(pData(DNAme), model.matrix( ~ IDH:AML + TET2:AML + AML))
 fitAgainstNBMs <- TET2(DNAme, design2) # AML-specific hyper now in coef 4!
 colnames(design2) # for reference below

 message("IDH vs. non-mutant AML @ p_adj < 0.05:")
 nrow(topTable(fitAgainstNBMs, coef=2, p.val=0.05, n=Inf)))

 message("TET2 vs. non-mutant AML @ p_adj < 0.05:")
 nrow(topTable(fitAgainstNBMs, coef=3, p.val=0.05, n=Inf))

 message("AML vs. normal bone marrow @ p_adj < 0.05:")
 nrow(topTable(fitAgainstNBMs, coef=4, p.val=0.05, n=Inf))

VanAndelInstitute/WorldsSimplestCodeReview documentation built on Jan. 26, 2022, 12:53 a.m.