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,
  dr.params = list(),
  group = TRUE,
  node_label = "group",
  ...
)

ssplot.compareClusterResult(
  x,
  showCategory = 30,
  pie = "equal",
  drfun = NULL,
  dr.params = list(),
  group = TRUE,
  node_label = "group",
  ...
)

Arguments

x

Enrichment result.

...

additional parameters

additional parameters can refer the following parameters.

  • color Variable that used to color enriched terms, e.g. 'pvalue','p.adjust' or 'qvalue'. the starting position of each text label.

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

  • size_category Number indicating the amount by which plotting category nodes should be scaled relative to the default.

  • label_style style of group label, one of "shadowtext" and "ggforce".

  • group Logical, if TRUE, the grouping legend will be displayed. The default is FALSE.

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

dr.params

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

group

logical, if TRUE, group the category.

node_label

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

pie

one of 'equal' or 'Count' to set the slice ratio of the pies

Value

ggplot object

Author(s)

Guangchuang Yu

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 Nov. 8, 2024, 5:20 p.m.