emapplot_cluster: emapplot_cluster

Description Usage Arguments Details Value Examples

Description

Functional grouping network diagram for enrichment result of over-representation test or gene set enrichment analysis

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
emapplot_cluster(
  x,
  showCategory = nrow(x),
  color = "p.adjust",
  label_format = 30,
  ...
)

## S4 method for signature 'enrichResult'
emapplot_cluster(
  x,
  showCategory = 30,
  color = "p.adjust",
  label_format = 30,
  ...
)

## S4 method for signature 'gseaResult'
emapplot_cluster(
  x,
  showCategory = 30,
  color = "p.adjust",
  label_format = 30,
  ...
)

## S4 method for signature 'compareClusterResult'
emapplot_cluster(
  x,
  showCategory = nrow(x),
  color = "p.adjust",
  label_format = 30,
  ...
)

emapplot_cluster.enrichResult(
  x,
  showCategory = 30,
  color = "p.adjust",
  cex_line = 1,
  with_edge = TRUE,
  nWords = 4,
  nCluster = NULL,
  split = NULL,
  min_edge = 0.2,
  cex_label_group = 1,
  label_style = "shadowtext",
  group_legend = FALSE,
  cex_category = 1,
  label_format = 30,
  repel = FALSE,
  ...
)

emapplot_cluster.compareClusterResult(
  x,
  showCategory = 30,
  color = "p.adjust",
  cex_line = 1,
  with_edge = TRUE,
  nWords = 4,
  nCluster = NULL,
  split = NULL,
  min_edge = 0.2,
  cex_label_group = 1,
  pie = "equal",
  legend_n = 5,
  cex_category = 1,
  label_style = "shadowtext",
  group_legend = FALSE,
  label_format = 30,
  repel = FALSE,
  ...
)

Arguments

x

enrichment result.

showCategory

number of enriched terms to display

color

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

label_format

a numeric value sets wrap length, alternatively a custom function to format axis labels.

...

Additional parameters used to set the position of the group label. When the parameter repel is set to TRUE, additional parameters will take effect.

additional parameters can refer the following parameters.

  • force Force of repulsion between overlapping text labels. Defaults to 1.

  • nudge_x, nudge_y Horizontal and vertical adjustments to nudge the starting position of each text label.

  • direction "both", "x", or "y" – direction in which to adjust position of labels.

cex_line

scale of line width

with_edge

if TRUE, draw the edges of the network diagram

nWords

the number of words in the cluster tags

nCluster

the number of clusters

split

separate result by 'category' variable

min_edge

minimum percentage of overlap genes to display the edge, should between 0 and 1, default value is 0.2

cex_label_group

scale of group labels size

label_style

one of "shadowtext" and "ggforce"

group_legend

If TRUE, the grouping legend will be displayed. The default is FALSE

cex_category

number indicating the amount by which plotting category nodes should be scaled relative to the default.

repel

whether to correct the position of the label. Defaults to FALSE.

pie

proportion of clusters in the pie chart, one of 'equal' (default) or 'Count'

legend_n

number of circle in legend

Details

This function visualizes gene sets as a grouped network (i.e. enrichment map). Gene sets with high similarity tend to cluster together, making it easier for interpretation.

Value

ggplot object

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
## Not run: 
    library(clusterProfiler)
    library(org.Hs.eg.db)
    library(enrichplot)
    library(GOSemSim)
    library(DOSE)
    data(geneList)
    gene <- names(geneList)[abs(geneList) > 2]
    ego <- enrichGO(gene  = gene,
        universe      = names(geneList),
        OrgDb         = org.Hs.eg.db,
        ont           = "CC",
        pAdjustMethod = "BH",
        pvalueCutoff  = 0.01,
        qvalueCutoff  = 0.05,
        readable      = TRUE)
    d <- godata('org.Hs.eg.db', ont="BP")
    ego2 <- pairwise_termsim(ego, method = "Wang", semData = d)
    emapplot_cluster(ego2, showCategory = 80)
   
## End(Not run)

enrichplot documentation built on Jan. 30, 2021, 2:01 a.m.