cnetplot | R Documentation |
Gene-Concept Network
cnetplot(x, ...)
## S4 method for signature 'enrichResult'
cnetplot(x, ...)
## S4 method for signature 'list'
cnetplot(x, ...)
## S4 method for signature 'gseaResult'
cnetplot(x, ...)
## S4 method for signature 'compareClusterResult'
cnetplot(x, ...)
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",
color.params = list(foldChange = NULL, edge = FALSE, category = "#E5C494", gene =
"#B3B3B3"),
cex.params = list(category_node = 1, gene_node = 1, category_label = 1, gene_label = 1),
hilight.params = list(category = NULL, alpha_hilight = 1, alpha_no_hilight = 0.3),
...
)
x |
Enrichment result. |
... |
Additional parameters |
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. Will be removed in the next version. |
layout |
Layout of the map, e.g. 'star', 'circle', 'gem', 'dh', 'graphopt', 'grid', 'mds', 'randomly', 'fr', 'kk', 'drl' or 'lgl'. |
colorEdge |
Logical, whether coloring edge by enriched terms, the default value is FALSE. Will be removed in the next version. |
circular |
Logical, whether using circular layout, the default value is FALSE. Will be removed in the next version. |
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. Will be removed in the next version. |
cex_gene |
Number indicating the amount by which plotting gene nodes should be scaled relative to the default, the default value is 1. Will be removed in the next version. |
cex_label_category |
Scale of category node label size, the default value is 1. Will be removed in the next version. |
cex_label_gene |
Scale of gene node label size, the default value is 1. Will be removed in the next version. |
color_category |
Color of category node. Will be removed in the next version. |
color_gene |
Color of gene node. Will be removed in the next version. |
shadowtext |
select which node labels to use shadow font, one of 'category', 'gene', 'all' and 'none', default is 'all'. |
color.params |
list, the parameters to control the attributes of highlighted nodes and edges. see the color.params in the following. color.params control the attributes of highlight, it can be referred to the following parameters:
|
cex.params |
list, the parameters to control the size of nodes and lables. see the cex.params in the following. cex.params control the attributes of highlight, it can be referred to the following parameters:
|
hilight.params |
list, the parameters to control the attributes of highlighted nodes and edges. see the hilight.params in the following. hilight.params control the attributes of highlight, it can be referred to the following parameters:
|
plot linkages of genes and enriched concepts (e.g. GO categories, KEGG pathways)
ggplot object
Guangchuang Yu
## 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)
# 'compareClusterResult' object is also supported.
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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.