### R code from vignette source 'APTvsXPS.Rnw' ################################################### ### code chunk number 1: APTvsXPS.Rnw:76-77 (eval = FALSE) ################################################### ## apt.rma.sk <- read.delim("rma-bg.quant-norm.pm-only.med-polish.summary.txt", row.names=1, comment.char="", skip=52) ################################################### ### code chunk number 2: APTvsXPS.Rnw:89-90 (eval = FALSE) ################################################### ## apt.rma <- read.delim("rma-bg.quant-norm.pm-only.med-polish.summary.txt", row.names=1, comment.char="", skip=52) ################################################### ### code chunk number 3: APTvsXPS.Rnw:97-98 (eval = FALSE) ################################################### ## plot(log2(apt.rma[,1] * apt.rma.sk[,1])/2, log2(apt.rma.sk[,1]/apt.rma[,1]), main="APT: RMA vs RMA-sketch", xlab="A = Log2(SketchRMA*RMA)", ylab="M = Log2(SketchRMA/RMA)",log="",ylim=c(-0.1,0.1)) ################################################### ### code chunk number 4: APTvsXPS.Rnw:125-127 (eval = FALSE) ################################################### ## data.rma <- rma(data.u133p2, "MixU133P2RMA", background="pmonly", normalize=TRUE) ## xps.rma <- validData(data.rma) ################################################### ### code chunk number 5: APTvsXPS.Rnw:133-134 (eval = FALSE) ################################################### ## plot(log2(apt.rma[,1] * xps.rma[,1])/2, log2(xps.rma[,1]/apt.rma[,1]), main="RMA: XPS vs APT", xlab="A = Log2(XPS*APT)", ylab="M = Log2(XPS/APT)",log="",ylim=c(-0.1,0.1)) ################################################### ### code chunk number 6: APTvsXPS.Rnw:152-154 (eval = FALSE) ################################################### ## affy.rma <- justRMA() ## affy.rma <- 2^exprs(affy.rma) ################################################### ### code chunk number 7: APTvsXPS.Rnw:159-162 (eval = FALSE) ################################################### ## tmp <- cbind(xps.rma[,1],affy.rma[,1],apt.rma[,1]) ## colnames(tmp) <- c("xps.rma","affy.rma","apt.rma") ## pairs(log2(tmp), labels=colnames(tmp)) ################################################### ### code chunk number 8: APTvsXPS.Rnw:190-192 (eval = FALSE) ################################################### ## apt.mas5 <- read.delim("mas5-bg.pm-mm.mas5-signal.summary.txt", row.names=1, comment.char="", skip=52) ## apt.mas5 <- apply(apt.mas5, 2, function(x){x*(500/mean(x, trim=0.02))}) ################################################### ### code chunk number 9: APTvsXPS.Rnw:197-199 (eval = FALSE) ################################################### ## data.mas5 <- mas5(data.u133p2,"MixU133P2MAS5All", normalize=TRUE, sc=500, update=TRUE) ## xps.mas5 <- validData(data.mas5) ################################################### ### code chunk number 10: APTvsXPS.Rnw:204-207 (eval = FALSE) ################################################### ## affy <- ReadAffy() ## affy.mas5 <- mas5(affy, normalize=TRUE, sc=500) ## affy.mas5 <- exprs(affy.mas5) ################################################### ### code chunk number 11: APTvsXPS.Rnw:245-247 (eval = FALSE) ################################################### ## call.mas5 <- mas5.call(data.u133p2,"MixU133P2Call") ## xps.pval <- validData(call.mas5) ################################################### ### code chunk number 12: APTvsXPS.Rnw:252-255 (eval = FALSE) ################################################### ## affy <- ReadAffy() ## affy.dc5 <- mas5calls(affy) ## affy.pval <- assayData(affy.dc5)[["se.exprs"]] ################################################### ### code chunk number 13: APTvsXPS.Rnw:294-297 (eval = FALSE) ################################################### ## data.rma.tc <- rma(data.genome,"MixHuGeneRMAcore_tc", background="antigenomic", ## normalize=TRUE, option="transcript", exonlevel="core") ## xps.rma.tc <- validData(data.rma.tc) ################################################### ### code chunk number 14: APTvsXPS.Rnw:302-305 (eval = FALSE) ################################################### ## tmp <- as.data.frame(rownames(xps.rma.tc)) ## colnames(tmp) <- "probeset_id" ## write.table(tmp, "transcriptList.txt", quote=FALSE, row.names=FALSE) ################################################### ### code chunk number 15: APTvsXPS.Rnw:339-343 (eval = FALSE) ################################################### ## expr.mp.tc <- express(data.genome, "MixHuGeneMedPolcore_tc", summarize.method="medianpolish", ## summarize.select="pmonly", summarize.option="transcript", summarize.logbase="log2", ## summarize.params=c(10, 0.01, 1.0), exonlevel="core") ## xps.mp.tc <- validData(expr.mp.tc) ################################################### ### code chunk number 16: APTvsXPS.Rnw:381-384 (eval = FALSE) ################################################### ## data.rma.tc.bq99 <- rma(data.genome, "HuGeneMixRMAbgqu99mp9", background="antigenomic", ## normalize=TRUE, exonlevel=c(992316,992316,9216)) ## xps.rma.tc.bq99 <- validData(data.rma.tc.bq99) ################################################### ### code chunk number 17: APTvsXPS.Rnw:420-423 (eval = FALSE) ################################################### ## call.dabg.tc <- dabg.call(data.genome, "HuGeneMixDABGcore_tc", ## option="transcript", exonlevel="core") ## xps.pval.tc <- validData(call.dabg.tc) ################################################### ### code chunk number 18: APTvsXPS.Rnw:451-453 (eval = FALSE) ################################################### ## writeLines(rownames(xps.rma.tc), "core.txt") ## metaProbesets(scheme.genome, "core.txt", "coreList.mps", "core") ################################################### ### code chunk number 19: APTvsXPS.Rnw:473-476 (eval = FALSE) ################################################### ## data.rma.ps <- rma(data.genome, "MixHuGeneRMAcore_ps", background="antigenomic", ## normalize=TRUE, option="probeset", exonlevel="core") ## xps.rma.ps <- validData(data.rma.ps) ################################################### ### code chunk number 20: APTvsXPS.Rnw:481-484 (eval = FALSE) ################################################### ## tmp <- as.data.frame(rownames(xps.rma.ps)) ## colnames(tmp) <- "probeset_id" ## write.table(tmp, "probesetList.txt", quote=FALSE, row.names=FALSE) ################################################### ### code chunk number 21: APTvsXPS.Rnw:509-512 (eval = FALSE) ################################################### ## data.rma.ps.bq99 <- rma(data.genome,"HuGeneMixRMAbgqu99mp9_ps", background="antigenomic", ## normalize=TRUE, option="probeset", exonlevel=c(992316,992316,9216)) ## xps.rma.ps.bq99 <- validData(data.rma.ps.bq99) ################################################### ### code chunk number 22: APTvsXPS.Rnw:538-541 (eval = FALSE) ################################################### ## data.rma.ps <- rma(data.exon, "MixHuExonRMAcore_ps", background="antigenomic", ## normalize=TRUE, option="probeset", exonlevel="core") ## xps.rma.ps <- validData(data.rma.ps) ################################################### ### code chunk number 23: APTvsXPS.Rnw:546-549 (eval = FALSE) ################################################### ## tmp <- as.data.frame(rownames(xps.rma.ps)) ## colnames(tmp) <- "probeset_id" ## write.table(tmp, "corePSList.txt", quote=FALSE, row.names=FALSE) ################################################### ### code chunk number 24: APTvsXPS.Rnw:578-582 (eval = FALSE) ################################################### ## expr.mp.ps <- express(data.exon, "HuExonMedPolcorePS", summarize.method="medianpolish", ## summarize.select="pmonly", summarize.option="probeset", summarize.logbase="log2", ## summarize.params=c(10, 0.01, 1.0), exonlevel="core") ## xps.mp.ps <- validData(expr.mp.ps) ################################################### ### code chunk number 25: APTvsXPS.Rnw:612-615 (eval = FALSE) ################################################### ## data.rma.ps.bq103 <- rma(data.exon, "HuExonMixRMAbgqu103mp9_ps", background="antigenomic", ## normalize=TRUE, option="probeset", exonlevel=c(1032124,1032124,9216)) ## xps.rma.ps.bq103 <- validData(data.rma.ps.bq103) ################################################### ### code chunk number 26: APTvsXPS.Rnw:646-649 (eval = FALSE) ################################################### ## data.rma.tc <- rma(data.exon, "MixHuExonRMAcore_tc", background="antigenomic", ## normalize=TRUE, option="transcript", exonlevel="core") ## xps.rma.tc <- validData(data.rma.tc) ################################################### ### code chunk number 27: APTvsXPS.Rnw:654-656 (eval = FALSE) ################################################### ## writeLines(rownames(xps.rma.tc), "core.txt") ## metaProbesets(scheme.exon, "core.txt", "coreList.mps", "core") ################################################### ### code chunk number 28: APTvsXPS.Rnw:683-687 (eval = FALSE) ################################################### ## expr.mp.tc <- express(data.exon, "HuExonMedPolcore", summarize.method="medianpolish", ## summarize.select="pmonly", summarize.option="transcript", summarize.logbase="log2", ## summarize.params=c(10, 0.01, 1.0), exonlevel="core") ## xps.mp.tc <- validData(expr.mp.tc) ################################################### ### code chunk number 29: APTvsXPS.Rnw:715-718 (eval = FALSE) ################################################### ## data.rma.tc.bq103 <- rma(data.exon, "HuExonMixRMAbgqu103mp9_tc", background="antigenomic", ## normalize=TRUE, option="transcript", exonlevel=c(1032124,1032124,9216)) ## xps.rma.tc.bq103 <- validData(data.rma.tc.bq103) ################################################### ### code chunk number 30: APTvsXPS.Rnw:753-755 (eval = FALSE) ################################################### ## call.dabg.ps <- dabg.call(data.exon, "HuExonDABGcorePS", option="probeset", exonlevel="core") ## xps.pval.ps <- validData(call.dabg.ps) ################################################### ### code chunk number 31: APTvsXPS.Rnw:776-778 (eval = FALSE) ################################################### ## call.dabg.tc <- dabg.call(data.exon, "HuExonDABGcoreTC", option="transcript", exonlevel="core") ## xps.pval.tc <- pvalData(call.dabg.tc) ################################################### ### code chunk number 32: APTvsXPS.Rnw:796-799 (eval = FALSE) ################################################### ## hx2hg <- read.delim("HuExVsHuGene_BestMatch.txt", row.names=3) ## up2hx <- read.delim("U133PlusVsHuEx_BestMatch.txt", row.names=3) ## up2hg <- read.delim("U133PlusVsHuGene_BestMatch.txt", row.names=3) ################################################### ### code chunk number 33: APTvsXPS.Rnw:808-815 (eval = FALSE) ################################################### ## hx2hg <- uniqueframe(hx2hg) ## up2hx <- uniqueframe(up2hx) ## up2hg <- uniqueframe(up2hg) ## u2x <- intersectframes(up2hx, up2hg) ## u2g <- intersectframes(up2hg, up2hx) ## tmp <- intersectrows(u2gx, xps.grma, 1, NULL) ## core <- intersectrows(tmp, xps.xrma, 2, NULL) ################################################### ### code chunk number 34: APTvsXPS.Rnw:826-831 (eval = FALSE) ################################################### ## xpsu <- intersectrows(xps.urma, core, NULL, NULL) ## xpsg <- intersectrows(xps.grma, core, NULL, 1, -1) ## xpsx <- intersectrows(xps.xrma, core, NULL, 2, -1) ## aptg <- intersectrows(apt.grma, core, NULL, 1, -1) ## aptx <- intersectrows(apt.xrma, core, NULL, 2, -1) ################################################### ### code chunk number 35: APTvsXPS.Rnw:862-865 (eval = FALSE) ################################################### ## tissue <- c(rep("Breast", 3), rep("Prostate", 3)) ## design <- model.matrix(~factor(tissue)) ## colnames(design) <- c("Breast","BreastvsProstate") ################################################### ### code chunk number 36: APTvsXPS.Rnw:870-874 (eval = FALSE) ################################################### ## tmp <- as.matrix(log2(xpsu)) ## fit <- lmFit(tmp, design) ## fit <- eBayes(fit) ## xpsu.lm <- topTable(fit, coef=2, n=length(rownames(tmp)), adjust="BH") ################################################### ### code chunk number 37: APTvsXPS.Rnw:1040-1041 (eval = FALSE) ################################################### ## apt.plier <- read.delim("plier-mm.summary.txt", row.names=1, comment.char="", skip=52) ################################################### ### code chunk number 38: APTvsXPS.Rnw:1049-1050 (eval = FALSE) ################################################### ## plot(apt.plier[,1], apt.plier[,2], main="APT: PLIER", xlab="Breast_A", ylab="Breast_B",log="xy") ################################################### ### code chunk number 39: APTvsXPS.Rnw:1064-1066 (eval = FALSE) ################################################### ## plot(log2(apt.plier[,1] * apt.plier[,2])/2, log2(apt.plier[,1]/apt.plier[,2]), main="APT: PLIER", xlab="A = Log2(BrA*BrB)", ylab="M = Log2(BrA/BrB)",log="") ## plot(log2(apt.rma[,1] * apt.rma[,2])/2, log2(apt.rma[,1]/apt.rma[,2]), main="APT: RMA", xlab="A = Log2(BrA*BrB)", ylab="M = Log2(BrA/BrB)",log="",ylim=c(-10,10))