cnetplot: cnetplot

Description Usage Arguments Details Value Author(s) Examples

Description

Gene-Concept Network

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
cnetplot(x, showCategory = 5, foldChange = NULL, layout = "kk", ...)

## S4 method for signature 'enrichResult'
cnetplot(x, showCategory = 5, foldChange = NULL, layout = "kk", ...)

## S4 method for signature 'list'
cnetplot(x, showCategory = 5, foldChange = NULL, layout = "kk", ...)

## S4 method for signature 'gseaResult'
cnetplot(x, showCategory = 5, foldChange = NULL, layout = "kk", ...)

## S4 method for signature 'compareClusterResult'
cnetplot(x, showCategory = 5, foldChange = NULL, layout = "kk", ...)

cnetplot.enrichResult(
  x,
  showCategory = 5,
  foldChange = NULL,
  layout = "kk",
  colorEdge = FALSE,
  circular = FALSE,
  node_label = "all",
  cex_category = 1,
  cex_gene = 1,
  cex_label_category = 1,
  cex_label_gene = 1,
  color_category = "#E5C494",
  color_gene = "#B3B3B3",
  shadowtext = "all",
  ...
)

Arguments

x

Enrichment result.

showCategory

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

foldChange

Fold Change of nodes, the default value is NULL. If the user provides the Fold Change value of the nodes, it can be used to set the color of the gene node.

layout

Layout of the map, e.g. 'star', 'circle', 'gem', 'dh', 'graphopt', 'grid', 'mds', 'randomly', 'fr', 'kk', 'drl' or 'lgl'.

...

Additional parameters

colorEdge

Logical, whether coloring edge by enriched terms, the default value is FALSE.

circular

Logical, whether using circular layout, the default value is FALSE.

node_label

Select which labels to be displayed. one of 'category', 'gene', 'all'(the default) and 'none'.

cex_category

Number indicating the amount by which plotting category nodes should be scaled relative to the default, the default value is 1.

cex_gene

Number indicating the amount by which plotting gene nodes should be scaled relative to the default, the default value is 1.

cex_label_category

Scale of category node label size, the default value is 1.

cex_label_gene

Scale of gene node label size, the default value is 1.

color_category

Color of category node.

color_gene

Color of gene node.

shadowtext

select which node labels to use shadow font, one of 'category', 'gene', 'all' and 'none', default is 'all'.

Details

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

Value

ggplot object

Author(s)

Guangchuang Yu

Examples

 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
## Not run: 
    library(DOSE)
    data(geneList)
    de <- names(geneList)[1:100]
    x <- enrichDO(de)
    x2 <- pairwise_termsim(x)
    cnetplot(x2)
    # use `layout` to change the layout of map
    cnetplot(x2, layout = "star")
    # use `showCategory` to select the displayed terms. It can be a number of a vector of terms.
    cnetplot(x2, showCategory = 10)
    categorys <- c("pre-malignant neoplasm", "intestinal disease",
                   "breast ductal carcinoma", "non-small cell lung carcinoma")
    cnetplot(x2, 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)
    cnetplot(xx2)

## End(Not run)

GuangchuangYu/enrichplot documentation built on Aug. 31, 2021, 7:48 p.m.