ssplot: ssplot

ssplotR Documentation

ssplot

Description

Similarity space plot of enrichment analysis results.

Usage

ssplot(x, ...)

## S4 method for signature 'enrichResult'
ssplot(x, showCategory = 30, ...)

## S4 method for signature 'gseaResult'
ssplot(x, showCategory = 30, ...)

## S4 method for signature 'compareClusterResult'
ssplot(x, showCategory = 30, ...)

ssplot.enrichResult(
  x,
  showCategory = 30,
  drfun = NULL,
  with_edge = FALSE,
  dr.params = list(),
  group_category = TRUE,
  node_label = "group",
  ...
)

ssplot.compareClusterResult(
  x,
  showCategory = 30,
  split = NULL,
  pie = "equal",
  drfun = NULL,
  with_edge = FALSE,
  cex_pie2axis = 0.0125,
  dr.params = list(),
  group_category = TRUE,
  node_label = "group",
  ...
)

Arguments

x

Enrichment result.

...

additional parameters

additional parameters can refer the following parameters.

  • 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'. the starting position of each text label.

  • cex_line Scale of line width.

  • 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.

  • 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.

  • 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.

additional parameters can refer the emapplot function: emapplot.

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.

drfun

The function used for dimension reduction, e.g. stats::cmdscale (the default), vegan::metaMDS, or ape::pcoa.

with_edge

Logical, if TRUE, draw the edges of the network diagram. Will be removed in the next version.

dr.params

list, the parameters of tidydr::dr. one of 'category', 'group', 'all' and 'none'.

group_category

a logical, if TRUE, group the category. Will be removed in the next version.

node_label

Select which labels to be displayed, one of 'category', 'group', 'all' and 'none'.

split

separate result by 'category' variable

pie

proportion of clusters in the pie chart, one of 'equal' (default) and 'Count' Will be removed in the next version.

cex_pie2axis

It is used to adjust the relative size of the pie chart on the coordinate axis, the default value is 0.0125.

Value

ggplot object

Examples

## 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           = "BP",
        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)
    ssplot(ego2)    

## End(Not run)

YuLab-SMU/enrichplot documentation built on April 15, 2024, 5:18 p.m.