Microarray: Difference between revisions

From 太極
Jump to navigation Jump to search
Line 11: Line 11:
</pre>
</pre>


* Limma Guide (no .Rd file nor R code!) Section 9.6.
* Limma Guide Section 9.6 (no .Rd file nor R code!).
<pre>
<pre>
# Step 1 - Read the design and create eset.
# Step 1 - Read the design and create eset.
Line 21: Line 21:
colnames(design) <- lev
colnames(design) <- lev
fit <- lmFit(eset, design)
fit <- lmFit(eset, design)
# Step 2 - Which genes respond at either the 6 hour or 24 hour times in the wild-type?
# Step 2 - Which genes respond at either the 6 hour or 24 hour times in the wild-type?
cont.wt <- makeContrasts(
cont.wt <- makeContrasts(
Line 29: Line 30:
fit2 <- eBayes(fit2)
fit2 <- eBayes(fit2)
topTableF(fit2, adjust="BH")
topTableF(fit2, adjust="BH")
# Step 3- Which genes respond (i.e., change over time) in the mutant?
# Step 3- Which genes respond (i.e., change over time) in the mutant?
cont.mu <- makeContrasts(
cont.mu <- makeContrasts(
Line 37: Line 39:
fit2 <- eBayes(fit2)
fit2 <- eBayes(fit2)
topTableF(fit2, adjust="BH")
topTableF(fit2, adjust="BH")
# Step 4- Which genes respond differently over time in the mutant relative to the wild-type?
# Step 4- Which genes respond differently over time in the mutant relative to the wild-type?
cont.dif <- makeContrasts(
cont.dif <- makeContrasts(

Revision as of 11:57, 3 November 2014

Time Course

Limma package

> data(drosEmbryoRMA)
Warning message:
'drosEmbryoRMA' looks like a pre-2.4.0 S4 object: please recreate it 
  • Limma Guide Section 9.6 (no .Rd file nor R code!).
# Step 1 - Read the design and create eset.
targets = readTargets("targets.txt")
eset = rma(ReadAffy())
lev <- c("wt.0hr","wt.6hr","wt.24hr","mu.0hr","mu.6hr","mu.24hr")
f <- factor(targets$Target, levels=lev)
design <- model.matrix(~0+f)
colnames(design) <- lev
fit <- lmFit(eset, design)

# Step 2 - Which genes respond at either the 6 hour or 24 hour times in the wild-type?
cont.wt <- makeContrasts(
"wt.6hr-wt.0hr",
"wt.24hr-wt.6hr",
levels=design)
fit2 <- contrasts.fit(fit, cont.wt)
fit2 <- eBayes(fit2)
topTableF(fit2, adjust="BH")

# Step 3- Which genes respond (i.e., change over time) in the mutant?
cont.mu <- makeContrasts(
"mu.6hr-mu.0hr",
"mu.24hr-mu.6hr",
levels=design)
fit2 <- contrasts.fit(fit, cont.mu)
fit2 <- eBayes(fit2)
topTableF(fit2, adjust="BH")

# Step 4- Which genes respond differently over time in the mutant relative to the wild-type?
cont.dif <- makeContrasts(
Dif6hr =(mu.6hr-mu.0hr)-(wt.6hr-wt.0hr),
Dif24hr=(mu.24hr-mu.6hr)-(wt.24hr-wt.6hr),
levels=design)
fit2 <- contrasts.fit(fit, cont.dif)
fit2 <- eBayes(fit2)
topTableF(fit2, adjust="BH")

A case study using Limma package

http://www.biomedcentral.com/1756-0500/3/81

timecourse package