dotplot: dotplot

dotplotR Documentation

dotplot

Description

dotplot for enrichment result

Usage

dotplot(object, ...)

## S4 method for signature 'enrichResult'
dotplot(
  object,
  x = "GeneRatio",
  color = "p.adjust",
  showCategory = 10,
  size = NULL,
  split = NULL,
  font.size = 12,
  title = "",
  orderBy = "x",
  label_format = 30,
  ...
)

## S4 method for signature 'gseaResult'
dotplot(
  object,
  x = "GeneRatio",
  color = "p.adjust",
  showCategory = 10,
  size = NULL,
  split = NULL,
  font.size = 12,
  title = "",
  orderBy = "x",
  label_format = 30,
  ...
)

## S4 method for signature 'compareClusterResult'
dotplot(
  object,
  x = "Cluster",
  color = "p.adjust",
  showCategory = 5,
  split = NULL,
  font.size = 12,
  title = "",
  by = "geneRatio",
  size = NULL,
  includeAll = TRUE,
  label_format = 30,
  ...
)

## S4 method for signature 'enrichResultList'
dotplot(
  object,
  x = "GeneRatio",
  color = "p.adjust",
  showCategory = 10,
  size = NULL,
  split = NULL,
  font.size = 12,
  title = "",
  orderBy = "x",
  label_format = 30,
  ...
)

## S4 method for signature 'gseaResultList'
dotplot(
  object,
  x = "GeneRatio",
  color = "p.adjust",
  showCategory = 10,
  size = NULL,
  split = NULL,
  font.size = 12,
  title = "",
  orderBy = "x",
  label_format = 30,
  ...
)

dotplot.enrichResult(
  object,
  x = "geneRatio",
  color = "p.adjust",
  showCategory = 10,
  size = NULL,
  split = NULL,
  font.size = 12,
  title = "",
  orderBy = "x",
  label_format = 30,
  decreasing = TRUE
)

dotplot.compareClusterResult(
  object,
  x = "Cluster",
  colorBy = "p.adjust",
  showCategory = 5,
  by = "geneRatio",
  size = "geneRatio",
  split = NULL,
  includeAll = TRUE,
  font.size = 12,
  title = "",
  label_format = 30,
  group = FALSE,
  shape = FALSE,
  facet = NULL,
  strip_width = 15
)

Arguments

object

compareClusterResult object

...

additional parameters

x

variable for x-axis, one of 'GeneRatio' and 'Count'

color

variable that used to color enriched terms, e.g. 'pvalue', 'p.adjust' or 'qvalue'

showCategory

A number or a list of terms. If it is a number, the first n terms will be displayed. If it is a list of terms, the selected terms will be displayed.

size

variable that used to scale the sizes of categories, one of "geneRatio", "Percentage" and "count"

split

apply ‘showCategory' to each category specified by the ’split', e.g., "ONTOLOGY", "category" and "intersect". Default is NULL and do nothing

font.size

font size

title

figure title

orderBy

The order of the Y-axis

label_format

a numeric value sets wrap length, alternatively a custom function to format axis labels. by default wraps names longer that 30 characters

by

one of "geneRatio", "Percentage" and "count"

includeAll

logical

decreasing

logical. Should the orderBy order be increasing or decreasing?

colorBy

variable that used to color enriched terms, e.g. 'pvalue', 'p.adjust' or 'qvalue'

group

a logical value, whether to connect the nodes of the same group with wires.

shape

a logical value, whether to use nodes of different shapes to distinguish the group it belongs to

facet

apply 'facet_grid' to the plot by specified variable, e.g., "ONTOLOGY", "category" and "intersect".

strip_width

width of strip text, a.k.a facet label.

Value

plot

Author(s)

Guangchuang Yu

Examples

## Not run: 
    library(DOSE)
    data(geneList)
    de <- names(geneList)[1:100]
    x <- enrichDO(de)
    dotplot(x)
    # use `showCategory` to select the displayed terms. It can be a number of a vector of terms.
    dotplot(x, showCategory = 10)
    categorys <- c("pre-malignant neoplasm", "intestinal disease",
                   "breast ductal carcinoma", "non-small cell lung carcinoma")
    dotplot(x, showCategory = categorys)
    # It can also graph compareClusterResult
    data(gcSample)
    library(clusterProfiler)
    library(DOSE)
    library(org.Hs.eg.db)
    data(gcSample)
    xx <- compareCluster(gcSample, fun="enrichGO", OrgDb="org.Hs.eg.db")
    xx2 <- pairwise_termsim(xx)
    library(ggstar)
    dotplot(xx2)
    dotplot(xx2, shape = TRUE)
    dotplot(xx2, group = TRUE)
    dotplot(xx2, x = "GeneRatio", group = TRUE, size = "count")

## End(Not run)

YuLab-SMU/enrichplot documentation built on Dec. 18, 2024, 11:52 p.m.