
Gene-Concept Network
cnetplot(x, showCategory = 5, foldChange = NULL, layout = "kk", ...)# S4 method for enrichResult
cnetplot(x, showCategory = 5, foldChange = NULL, layout = "kk", ...)
# S4 method for list
cnetplot(x, showCategory = 5, foldChange = NULL, layout = "kk", ...)
# S4 method for gseaResult
cnetplot(x, showCategory = 5, foldChange = NULL, layout = "kk", ...)
# S4 method for 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",
...
)
Enrichment result.
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.
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 of the map, e.g. 'star', 'circle', 'gem', 'dh', 'graphopt', 'grid', 'mds', 'randomly', 'fr', 'kk', 'drl' or 'lgl'.
Additional parameters
Logical, whether coloring edge by enriched terms, the default value is FALSE.
Logical, whether using circular layout, the default value is FALSE.
Select which labels to be displayed. one of 'category', 'gene', 'all'(the default) and 'none'.
Number indicating the amount by which plotting category nodes should be scaled relative to the default, the default value is 1.
Number indicating the amount by which plotting gene nodes should be scaled relative to the default, the default value is 1.
Scale of category node label size, the default value is 1.
Scale of gene node label size, the default value is 1.
Color of category node.
Color of gene node.
select which node labels to use shadow font, one of 'category', 'gene', 'all' and 'none', default is 'all'.
ggplot object
plot linkages of genes and enriched concepts (e.g. GO categories, KEGG pathways)
# 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)
# }
Run the code above in your browser using DataLab