bioconductor v3.9.0 Enrichplot

The 'enrichplot' package implements several visualization methods for interpreting functional enrichment results obtained from ORA or GSEA analysis.

Link to this section Summary

Functions

cnetplot

color_palette

dotplot

emapplot

ggtable

goplot

gsInfo

gseaplot

gseaplot2

gsearank

heatplot

convert gene IDs to igraph object

pmcplot

Objects exported from other packages

ridgeplot

upsetplot method

Link to this section Functions

Link to this function

barplotenrichResult()

barplot

Description

barplot of enrichResult

Usage

list(list("barplot"), list("enrichResult"))(height, x = "Count", color = "p.adjust",
  showCategory = 8, font.size = 12, title = "", ...)

Arguments

ArgumentDescription
heightenrichResult object
xone of 'Count' and 'GeneRatio'
colorone of 'pvalue', 'p.adjust', 'qvalue'
showCategorynumber of categories to show
font.sizefont size
titleplot title
...other parameter, ignored

Value

ggplot object

Examples

library(DOSE)
data(geneList)
de <- names(geneList)[1:100]
x <- enrichDO(de)
barplot(x)

cnetplot

Description

Gene-Concept Network

Usage

cnetplot(x, showCategory = 5, foldChange = NULL, layout = "kk", ...)
list(list("cnetplot"), list("enrichResult"))(x, showCategory = 5,
  foldChange = NULL, layout = "kk", ...)
list(list("cnetplot"), list("gseaResult"))(x, showCategory = 5, foldChange = NULL,
  layout = "kk", ...)
cnetplot.enrichResult(x, showCategory = 5, foldChange = NULL,
  layout = "kk", colorEdge = FALSE, circular = FALSE,
  node_label = TRUE, ...)

Arguments

ArgumentDescription
xenrichment result
showCategorynumber of enriched terms to display
foldChangefold Change
layoutlayout of the network
...additional parameters
colorEdgewhether coloring edge by enriched terms
circularwhether using circular layout
node_labelwhether display node label

Details

plot linkages of genes and enriched concepts (e.g. GO categories, KEGG pathways)

Value

ggplot object

Author

Guangchuang Yu

Examples

library(DOSE)
data(geneList)
de <- names(geneList)[1:100]
x <- enrichDO(de)
cnetplot(x)
Link to this function

color_palette()

color_palette

Description

create color palette for continuous data

Usage

color_palette(colors)

Arguments

ArgumentDescription
colorscolors of length >=2

Value

color vector

Author

guangchuang yu

Examples

color_palette(c("red", "yellow", "green"))

dotplot

Description

dotplot for enrichment result

Usage

dotplot(object, ...)
list(list("dotplot"), list("enrichResult"))(object, x = "GeneRatio",
  color = "p.adjust", showCategory = 10, size = NULL, split = NULL,
  font.size = 12, title = "", ...)
list(list("dotplot"), list("gseaResult"))(object, x = "GeneRatio",
  color = "p.adjust", showCategory = 10, size = NULL, split = NULL,
  font.size = 12, title = "", ...)

Arguments

ArgumentDescription
objectinput object
...additional parameters
xvariable for x-axis, one of 'GeneRatio' or 'Count'
colorvariable that used to color enriched terms, e.g. pvalue, p.adjust or qvalue
showCategorynumber of enriched terms to display
sizevariable that used to scale the sizes of categories
splitseparate result by 'category' variable
font.sizefont size
titleplot title

Value

plot

Author

guangchuang yu

Examples

library(DOSE)
data(geneList)
de <- names(geneList)[1:100]
x <- enrichDO(de)
dotplot(x)

emapplot

Description

Enrichment Map for enrichment result of over-representation test or gene set enrichment analysis

Usage

emapplot(x, showCategory = 30, color = "p.adjust", layout = "kk",
  ...)
list(list("emapplot"), list("enrichResult"))(x, showCategory = 30,
  color = "p.adjust", layout = "kk", ...)
list(list("emapplot"), list("gseaResult"))(x, showCategory = 30,
  color = "p.adjust", layout = "kk", ...)
emapplot.enrichResult(x, showCategory = 30, color = "p.adjust",
  layout = "kk", ...)

Arguments

ArgumentDescription
xenrichment result.
showCategorynumber of enriched terms to display
colorvariable that used to color enriched terms, e.g. pvalue, p.adjust or qvalue
layoutlayout of the map
...additional parameters

Details

This function visualizes gene sets as a network (i.e. enrichment map). Mutually overlapping gene sets tend to cluster together, making it easier for interpretation.

Value

ggplot object

Author

Guangchuang Yu

Examples

library(DOSE)
data(geneList)
de <- names(geneList)[1:100]
x <- enrichDO(de)
emapplot(x)
Link to this function

fortifyenrichResult()

fortify

Description

convert enrichResult object for ggplot2

Usage

list(list("fortify"), list("enrichResult"))(model, data, showCategory = 5,
  by = "Count", order = FALSE, drop = FALSE, split = NULL, ...)

Arguments

ArgumentDescription
modelenrichResult object
datanot use here
showCategoryCategory numbers to show
byone of Count and GeneRatio
orderlogical
droplogical
splitseparate result by 'split' variable
...additional parameter

Value

data.frame

ggtable

Description

plot table

Usage

ggtable(d, p = NULL)

Arguments

ArgumentDescription
ddata frame
pggplot object to extract color to color rownames(d), optional

Value

ggplot object

Author

guangchuang yu

goplot

Description

plot induced GO DAG of significant terms

Usage

goplot(x, showCategory = 10, color = "p.adjust", layout = "sugiyama",
  geom = "text", ...)
list(list("goplot"), list("enrichResult"))(x, showCategory = 10,
  color = "p.adjust", layout = "sugiyama", geom = "text", ...)
list(list("goplot"), list("gseaResult"))(x, showCategory = 10, color = "p.adjust",
  layout = "sugiyama", geom = "text", ...)
goplot.enrichResult(x, showCategory = 10, color = "p.adjust",
  layout = "sugiyama", geom = "text", ...)

Arguments

ArgumentDescription
xenrichment result.
showCategorynumber of enriched terms to display
colorvariable that used to color enriched terms, e.g. pvalue, p.adjust or qvalue
layoutlayout of the map
geomlabel geom, one of 'label' or 'text'
...additional parameter

Value

ggplot object

Author

guangchuang yu

gsInfo

Description

extract gsea result of selected geneSet

Usage

gsInfo(object, geneSetID)

Arguments

ArgumentDescription
objectgseaResult object
geneSetIDgene set ID

Value

data.frame

Author

Guangchuang Yu

gseaplot

Description

visualize analyzing result of GSEA

Usage

gseaplot(x, geneSetID, by = "all", title = "", ...)
list(list("gseaplot"), list("gseaResult"))(x, geneSetID, by = "all", title = "",
  color = "black", color.line = "green", color.vline = "#FA5860",
  ...)
gseaplot.gseaResult(x, geneSetID, by = "all", title = "",
  color = "black", color.line = "green", color.vline = "#FA5860",
  ...)

Arguments

ArgumentDescription
xobject of gsea result
geneSetIDgeneSet ID
byone of "runningScore" or "position"
titleplot title
...additional parameters
colorcolor of line segments
color.linecolor of running enrichment score line
color.vlinecolor of vertical line which indicating the maximum/minimal running enrichment score

Details

plotting function for gseaResult

Value

ggplot2 object

ggplot2 object

Author

Guangchuang Yu

Examples

library(DOSE)
data(geneList)
x <- gseDO(geneList)
gseaplot(x, geneSetID=1)

gseaplot2

Description

GSEA plot that mimic the plot generated by broad institute's GSEA software

Usage

gseaplot2(x, geneSetID, title = "", color = "green", base_size = 11,
  rel_heights = c(1.5, 0.5, 1), subplots = 1:3, pvalue_table = FALSE,
  ES_geom = "line")

Arguments

ArgumentDescription
xgseaResult object
geneSetIDgene set ID
titleplot title
colorcolor of running enrichment score line
base_sizebase font size
rel_heightsrelative heights of subplots
subplotswhich subplots to be displayed
pvalue_tablewhether add pvalue table
ES_geomgeom for plotting running enrichment score, one of 'line' or 'dot'

Value

plot

Author

Guangchuang Yu

gsearank

Description

plot ranked list of genes with running enrichment score as bar height

Usage

gsearank(x, geneSetID, title = "")

Arguments

ArgumentDescription
xgseaResult object
geneSetIDgene set ID
titleplot title

Value

ggplot object

Author

Guangchuang Yu

heatplot

Description

heatmap like plot for functional classification

Usage

heatplot(x, showCategory = 30, foldChange = NULL)
list(list("heatplot"), list("enrichResult"))(x, showCategory = 30,
  foldChange = NULL)
list(list("heatplot"), list("gseaResult"))(x, showCategory = 30,
  foldChange = NULL)
heatplot.enrichResult(x, showCategory = 30, foldChange = NULL)

Arguments

ArgumentDescription
xenrichment result.
showCategorynumber of enriched terms to display
foldChangefold Change

Value

ggplot object

Author

guangchuang yu

Guangchuang Yu

Examples

library(DOSE)
data(geneList)
de <- names(geneList)[1:100]
x <- enrichDO(de)
heatplot(x)

convert gene IDs to igraph object

Description

convert a list of gene IDs to igraph object.

Usage

list2graph(inputList)

Arguments

ArgumentDescription
inputLista list of gene IDs

Value

a igraph object.

Author

Guangchuang Yu

pmcplot

Description

PubMed Central Trend plot

Usage

pmcplot(query, period, proportion = TRUE)

Arguments

ArgumentDescription
queryquery terms
periodperiod of query in the unit of year
proportionIf TRUE, use query_hits/all_hits, otherwise use query_hits

Value

ggplot object

Author

guangchuang yu

Objects exported from other packages

Description

These objects are imported from other packages. Follow the links below to see their documentation.

list(" ", " ", list(list("cowplot"), list(list(list("plot_grid")))), " ", " ", " ", list(list("ggplot2"), list(list(list("ggtitle")))), " ")

ridgeplot

Description

ridgeline plot for GSEA result

Usage

ridgeplot(x, showCategory = 30, fill = "p.adjust",
  core_enrichment = TRUE)
list(list("ridgeplot"), list("gseaResult"))(x, showCategory = 30,
  fill = "p.adjust", core_enrichment = TRUE)
ridgeplot.gseaResult(x, showCategory = 30, fill = "p.adjust",
  core_enrichment = TRUE)

Arguments

ArgumentDescription
xgseaResult object
showCategorynumber of categories for plotting
fillone of "pvalue", "p.adjust", "qvalue"
core_enrichmentwhether only using core_enriched genes

Value

ggplot object

Author

Guangchuang Yu

Examples

library(DOSE)
data(geneList)
x <- gseDO(geneList)
ridgeplot(x)
Link to this function

upsetplot_methods()

upsetplot method

Description

upsetplot method generics

Usage

upsetplot(x, ...)
list(list("upsetplot"), list("enrichResult"))(x, n = 10, ...)

Arguments

ArgumentDescription
xobject
...additional parameters
nnumber of categories to be plotted

Value

plot

Author

Guangchuang Yu

Examples

require(DOSE)
data(geneList)
de=names(geneList)[1:100]
x <- enrichDO(de)
upsetplot(x, 8)