enrichmentPlot {ChIPpeakAnno} | R Documentation

## plot enrichment results

### Description

Plot the GO/KEGG/reactome enrichment results

### Usage

    enrichmentPlot(
      res,
      n = 20,
      strlength = 30,
      orderBy = c("pvalue", "termId", "none")
    )

### Arguments

`res` | output of getEnrichedGO, getEnrichedPATH.
`n` | number of terms to be plot.
`strlength` | shorten the description of term by the number of char.
`orderBy` | order the data by pvalue, termId or none.

### Value

an object of ggplot

### Examples

    data(enrichedGO)
    enrichmentPlot(enrichedGO)
    if (interactive()||Sys.getenv("USER")=="jianhongou") {

         library(org.Hs.eg.db)
         library(GO.db)
         bed <- system.file("extdata", "MACS_output.bed", package="ChIPpeakAnno")
         gr1 <- toGRanges(bed, format="BED", header=FALSE)
         gff <- system.file("extdata", "GFF_peaks.gff", package="ChIPpeakAnno")
         gr2 <- toGRanges(gff, format="GFF", header=FALSE, skip=3)
         library(EnsDb.Hsapiens.v75) ##(hg19)
         annoData <- toGRanges(EnsDb.Hsapiens.v75)
         gr1.anno <- annoPeaks(gr1, annoData)
         gr2.anno <- annoPeaks(gr2, annoData)
         over <- lapply(GRangesList(gr1=gr1.anno, gr2=gr2.anno),
                        getEnrichedGO, orgAnn="org.Hs.eg.db",
                        maxP=.05, minGOterm=10, condense=TRUE)
         enrichmentPlot(over)
     }

[Package ChIPpeakAnno version 3.24.2 Index]