## ----include=FALSE------------------------------------------------------- library(DOSE) library(GO.db) library(org.Hs.eg.db) library(pathview) library(clusterProfiler) library(knitr) opts_chunk$set(tidy=TRUE,tidy.opts=list(keep.blank.line=FALSE, width.cutoff=50),out.truncate=80,out.lines=6,cache=TRUE,dev='pdf',include=TRUE,fig.width=6,fig.height=6,resolution=150) ## ----options,echo=FALSE-------------------------------------------------- options(digits=3, width=80, prompt=" ", continue=" ") ## ----groupGO------------------------------------------------------------- require(DOSE) data(geneList) gene <- names(geneList)[abs(geneList) > 2] head(gene) ggo <- groupGO(gene=gene, organism="human", ont="BP", level=3, readable=TRUE) head(summary(ggo)) ## ----enrichGO------------------------------------------------------------ ego <- enrichGO(gene=gene, universe = names(geneList), organism="human", ont="CC", pvalueCutoff=0.01, readable=TRUE) head(summary(ego)) ## ----enrichKEGG---------------------------------------------------------- kk <- enrichKEGG(gene=gene, organism="human", pvalueCutoff=0.01, readable=TRUE) head(summary(kk)) ## ----barplot, fig.height=5, fig.width=6---------------------------------- barplot(ggo, drop=TRUE, showCategory=12) ## ----barplot-enrich, fig.height=5, fig.width=8--------------------------- barplot(ego, showCategory=8) ## ----cnetplot, fig.height=14, fig.width=14------------------------------- cnetplot(ego, categorySize="pvalue", foldChange=geneList) ## ----cnetplot-KEGG, fig.height=14, fig.width=14-------------------------- cnetplot(kk, categorySize="geneNum", foldChange=geneList) ## ----viewKEGG------------------------------------------------------------ require(pathview) hsa04110 <- pathview(gene.data=geneList, pathway.id="hsa04110", species="hsa", limit=list(gene=max(abs(geneList)), cpd=1)) ## ----compareCluster, fig.height=8, fig.width=8--------------------------- data(gcSample) ck <- compareCluster(geneCluster=gcSample, fun="enrichKEGG") plot(ck) ## ----sessInfo, results='asis', echo=FALSE-------------------------------- toLatex(sessionInfo())