Description Usage Arguments Details Value Author(s) Examples
Enrichment Map for enrichment result of over-representation test or gene set enrichment analysis
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 | emapplot(x, showCategory = 30, ...)
## S4 method for signature 'enrichResult'
emapplot(x, showCategory = 30, ...)
## S4 method for signature 'gseaResult'
emapplot(x, showCategory = 30, ...)
## S4 method for signature 'compareClusterResult'
emapplot(x, showCategory = 30, ...)
emapplot.enrichResult(
x,
showCategory = 30,
layout = NULL,
coords = NULL,
color = "p.adjust",
min_edge = 0.2,
cex_label_category = 1,
cex_category = 1,
cex_line = 1,
shadowtext = TRUE,
label_style = "shadowtext",
repel = FALSE,
node_label = "category",
with_edge = TRUE,
group_category = FALSE,
group_legend = FALSE,
cex_label_group = 1,
nWords = 4,
label_format = 30,
clusterFunction = stats::kmeans,
nCluster = NULL,
...
)
emapplot.compareClusterResult(
x,
showCategory = 30,
layout = NULL,
coords = NULL,
split = NULL,
pie = "equal",
legend_n = 5,
cex_category = 1,
cex_line = 1,
min_edge = 0.2,
cex_label_category = 1,
shadowtext = TRUE,
with_edge = TRUE,
group_category = FALSE,
label_format = 30,
group_legend = FALSE,
node_label = "category",
label_style = "shadowtext",
repel = FALSE,
cex_label_group = 1,
nWords = 4,
clusterFunction = stats::kmeans,
nCluster = NULL,
cex_pie2axis = 1,
...
)
|
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. |
... |
additional parameters additional parameters can refer the following parameters.
|
layout |
Layout of the map, e.g. 'star', 'circle', 'gem', 'dh', 'graphopt', 'grid', 'mds', 'randomly', 'fr', 'kk', 'drl' or 'lgl'. |
coords |
a data.frame with two columns: 'x' for X-axis coordinate and 'y' for Y-axis coordinate. |
color |
Variable that used to color enriched terms, e.g. 'pvalue', 'p.adjust' or 'qvalue'. |
min_edge |
The minimum similarity threshold for whether two nodes are connected, should between 0 and 1, default value is 0.2. |
cex_label_category |
Scale of category node label size. |
cex_category |
Number indicating the amount by which plotting category nodes should be scaled relative to the default. |
cex_line |
Scale of line width |
shadowtext |
a logical value, whether to use shadow font. |
label_style |
style of group label, one of "shadowtext" and "ggforce". |
repel |
whether to correct the position of the label. Defaults to FALSE. |
node_label |
Select which labels to be displayed, one of 'category', 'group', 'all' and 'none'. |
with_edge |
Logical, if TRUE (the default), draw the edges of the network diagram. |
group_category |
a logical, if TRUE(the default), group the category. |
group_legend |
Logical, if TRUE, the grouping legend will be displayed. The default is FALSE. |
cex_label_group |
Numeric, scale of group labels size, the default value is 1. |
nWords |
Numeric, the number of words in the cluster tags, the default value is 4. |
label_format |
a numeric value sets wrap length, alternatively a custom function to format axis labels. |
clusterFunction |
function of Clustering method, such as stats::kmeans(the default), cluster::clara, cluster::fanny or cluster::pam. |
nCluster |
Numeric, the number of clusters, the default value is square root of the number of nodes. |
split |
separate result by 'category' variable |
pie |
proportion of clusters in the pie chart, one of 'equal' (default) and 'Count' |
legend_n |
number of circle in legend |
cex_pie2axis |
It is used to adjust the relative size of the pie chart on the coordinate axis, the default value is 1. |
This function visualizes gene sets as a network (i.e. enrichment map). Mutually overlapping gene sets tend to cluster together, making it easier for interpretation. When the similarity between terms meets a certain threshold (default is 0.2, adjusted by parameter 'min_edge'), there will be edges between terms. The stronger the similarity, the shorter and thicker the edges. The similarity between terms is obtained by function 'pairwise_termsim', the details of similarity calculation can be found in its documentation: pairwise_termsim.
ggplot object
Guangchuang Yu
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 | ## Not run:
library(DOSE)
data(geneList)
de <- names(geneList)[1:100]
x <- enrichDO(de)
x2 <- pairwise_termsim(x)
emapplot(x2)
# use `layout` to change the layout of map
emapplot(x2, layout = "star")
# use `showCategory` to select the displayed terms. It can be a number of a vector of terms.
emapplot(x2, showCategory = 10)
categorys <- c("pre-malignant neoplasm", "intestinal disease",
"breast ductal carcinoma", "non-small cell lung carcinoma")
emapplot(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)
emapplot(xx2)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.