LimmaGuideCh7-8.R

From Organic Design wiki
Revision as of 23:47, 31 August 2006 by Sven (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

library(limma)

  1. 7.2 Paired samples

design <- model.matrix(~ -1+factor(c(1,1,1,2,2,3,3,3))) colnames(design) <- c("group1", "group2", "group3") design

contrast.matrix <- makeContrasts(group2-group1, group3-group2, group3-group1, levels=design) contrast.matrix

  1. 7.3

targets <- readTargets(file.path("/Volumes/HD2/R/Examples/limmaGuideData", "runxtargets.txt"), sep=" ") targets design <- modelMatrix(targets,ref="EGFP") design contrast.matrix <- makeContrasts(AML1,CBFb,AML1.CBFb,AML1.CBFb-AML1,AML1.CBFb-CBFb, levels=design) contrast.matrix

  1. 8.1

targets <- data.frame(cbind(FileName=paste("File",1:3, sep=""), Cy3=c("wt","mu","wt"), Cy5=c("mu","wt","mu"))) targets

modelMatrix(targets, ref="wt")

  1. 8.4

targets <- data.frame(cbind(FileName=paste("File",1:5, sep=""), Cy3=rep("Ref",5), Cy5=rep(c("WT","Mu"), c(2,3)))) targets design <- modelMatrix(targets, ref="Ref") design contr <- makeContrasts(MUvsWT=WT-Mu, levels=design) contr design %*% contr