(转帖)R语言-Visualization of Functional Enrichment Result

原文地址:http://bioconductor.org/packages/devel/bioc/vignettes/enrichplot/inst/doc/enrichplot.html

The enrichplotpackage implements several methods for enrichment result visualization to help interpretation. It supports both hypergeometric test and gene set enrichment analysis. Both of them are widely used to characterize pathway/function relationships to elucidate molecular mechanisms from high-throughput genomic data.

Theenrichplotpackage supports visualizing enrichment results obtained fromDOSE(Yu et al. 2015),clusterProfiler(Yu et al. 2012),ReactomePA(Yu and He 2016)andmeshes.

Induced GO DAG graph

Gene Ontology (GO) is organized as a directed acyclic graph. An insighful way of looking at the results of the analysis is to investigate how the significant GO terms are distributed over the GO graph. Thegoplotfunction shows subgraph induced by most significant GO terms.

library(clusterProfiler)data(geneList,package="DOSE")de <- names(geneList)[abs(geneList)> 2]ego <- enrichGO(de,OrgDb ="org.Hs.eg.db",ont="BP",readable=TRUE)library(enrichplot)goplot(ego)

Bar plot

Bar plot is the most widely used method to visualize enriched terms. It depicts the enrichment scores (e.g.p values) and gene count or ratio as bar height and color.

barplot(ego,showCategory=20)

Dot plot

Dot plot is similar to bar plot with the capability to encode another score as dot size. Bothbarplotanddotplotsupports facetting to visualize sub-ontologies simultaneously.

dotplot(ego,showCategory=30)

go <- enrichGO(de,OrgDb ="org.Hs.eg.db",ont="all")dotplot(go,split="ONTOLOGY")+ facet_grid(ONTOLOGY~.,scale="free")

Gene-Concept Network

Both thebarplotanddotplotonly displayed most significant enriched terms, while users may want to know which genes are involved in these significant terms. Thecnetplotdepicts the linkages of genes and biological concepts (e.g.GO terms or KEGG pathways) as a network.

## remove redundent GO termsego2 <- simplify(ego)cnetplot(ego2,foldChange=geneList)

cnetplot(ego2,foldChange=geneList,circular =TRUE,colorEdge =TRUE)

UpSet Plot

Theupsetplotis an alternative tocnetplotfor visualizing the complex association between genes and gene sets. It emphasizes the gene overlapping among different gene sets.

upsetplot(ego)

Heatmap-like functional classification

Theheatplotis similar tocnetplot, while displaying the relationships as a heatmap. The gene-concept network may become too complicated if user want to show a large number significant terms. Theheatplotcan simplify the result and more easy to identify expression patterns.

heatplot(ego2)

heatplot(ego2,foldChange=geneList)

Enrichment Map

Enrichment map organizes enriched terms into a network with edges

connecting overlapping gene sets. In this way, mutually overlapping gene

sets are tend to cluster together, making it easy to identify

functional module.

emapplot(ego2)

ridgeline plot for expression distribution of GSEA result

Theridgeplotwill visualize expression distributions of core enriched genes for GSEA enriched categories. It helps users to interpret up/down-regulated pathways.

kk <- gseKEGG(geneList,nPerm=1000)ridgeplot(kk)

running score and preranked list of GSEA result

Running score and preranked list are traditional methods for visualizing GSEA result. Theenrichplotpackage supports both of them to visualize the distribution of the gene set and the enrichment score.

gseaplot(kk,geneSetID =1,by ="runningScore",title =kk$Description[1])

gseaplot(kk,geneSetID =1,by ="preranked",title =kk$Description[1])

gseaplot(kk,geneSetID =1,title =kk$Description[1])

References

Yu, Guangchuang, and Qing-Yu He. 2016. “ReactomePA: An R/Bioconductor Package for Reactome Pathway Analysis and Visualization.”Molecular BioSystems12 (2):477–79.https://doi.org/10.1039/C5MB00663E.

Yu, Guangchuang, Li-Gen Wang, Yanyan Han, and Qing-Yu He. 2012. “clusterProfiler: an R Package for Comparing Biological Themes Among Gene Clusters.”OMICS: A Journal of Integrative Biology16 (5):284–87.https://doi.org/10.1089/omi.2011.0118.

Yu, Guangchuang, Li-Gen Wang, Guang-Rong Yan, and Qing-Yu He. 2015. “DOSE: An R/Bioconductor Package for Disease Ontology Semantic and Enrichment Analysis.”Bioinformatics31 (4):608–9.https://doi.org/10.1093/bioinformatics/btu684.

你可能感兴趣的:((转帖)R语言-Visualization of Functional Enrichment Result)