### R代码从vignette源的pcot2。Rnw ' ################################################### ### 代码块1号:pcot2。Rnw: 46-50 ################################################### 库(pcot2)图书馆(乘)图书馆(hu6800.db) set.seed (1234567 ) ################################################### ### 代码块2号:pcot2。Rnw: 63 - 66 ################################################### 数据(golub) rownames (golub) < -戈卢布。Gnames [,3] colnames(golub) <- golub。cl ################################################### ### 代码块3号:pcot2。Rnw: 72 - 73 ################################################### golub。cl ################################################### ### 代码块数量4:pcot2。Rnw: 90 - 94 ################################################### KEGG。list <- as.list(hu6800PATH) imat <- getImat(golub, KEGG. path)列表中,ms = 10) colnames (imat) < -粘贴(“KEGG colnames (imat), 9 = " ") (imat暗淡 ) ################################################### ### 代码块5号:pcot2。Rnw: 102 - 103 ################################################### < - pcot2 (golub golub结果。cl, imat iter = 10 ) ################################################### ### 代码块6号:pcot2。Rnw: 117 - 119 ################################################### 结果res.sig结果res美元。所有 ################################################### ### 代码块7号:pcot2。Rnw: 174 - 186 ################################################### 选取< - c(“04620”、“04120”)pvalue < - c(0.001, 0.72)库(KEGG.db) pname < - unlist (mget(选取,env = KEGGPATHID2NAME))主要< -粘贴(“KEGG”,选取“:”,pname,“:”,“P =”,pvalue, 9 = " "),(我在1:长度(sel)){帧< -粘贴(“corplot2-KEGG”,选取[我],“jpg”,9 = " ")jpeg(帧、宽= 1600,高= 1200,质量= 100)selgene < - rownames (imat) [imat[,配(粘贴(“KEGG”,选取9 = " ")[我],colnames (imat))) = = 1] corplot2 (golub selgene, golub。cl,主要主要=[我])dev.off () } ################################################### ### 代码块8号:pcot2。Rnw:233-245 ################################################### pathlist <- as.list(hu6800PATH) pathlist <- pathlist[match(rownames(golub), names(pathlist))] ids <- unlist(mget(names(pathlist), env=hu6800SYMBOL)) #### transform data matrix only #### newdata <- aveProbe(x=golub, ids=ids)$newx #### transform both data and imat #### output <- aveProbe(x=golub, imat, ids=ids) newdata <- output$newx newimat <- output$newimat newimat <- newimat[,apply(newimat, 2,Sum)>=10] dim(newdata)