View source: R/plot.multi.gsea.R
plot.multi.gsea | R Documentation |
Function to plot GSEA results (see clusterprofiler).
## S3 method for class 'multi.gsea'
plot(
gsea.results,
geneset.id.list = NULL,
enrichment.geom = "line",
geneset.colors = NULL,
enrichment.geom.size = 1,
enrichment.plot.zero.line = FALSE,
enrichment.zero.line.color = "gray",
enrichment.zero.line.width = 0.5,
geneset.segments.width = 0.3,
geneset.segments.color = "black",
ranking.color = "gray",
gradient.colors = c("Reds", "Blues"),
table.font.size = 8,
title.position = "center",
title = NULL,
combined.plot.height.ratios = c(1, 0.4, 0.6, 0.5),
image.file.name = NULL,
image.width = 9,
image.height = 6,
return.all.objects = FALSE
)
gsea.results |
A |
enrichment.geom |
String indicating the type of graph to use to plot the enrichment scores. Possible options: 'line', 'lines', 'dot', 'dots', 'point', 'points' (case insensitive). Default: |
geneset.colors |
String vector indicating a list of any R-supported color to be used for the enrichment score plot per each dataset. Default: |
enrichment.geom.size |
Numeric value indicating the size of the line, or dots, used in the enrichment score plot. Default: |
enrichment.plot.zero.line |
Logical value to indicated whether to plot an horizontal line at 0 in the enrichment score plot. Default: |
enrichment.zero.line.color |
String indicating any R-supported color to be used for the 0-line in the enrichment score plot (active when |
enrichment.zero.line.width |
Numeric value indicating the line width of the 0-line in the enrichment score plot (active when |
geneset.segments.width |
Numeric value indicating the line width of the geneSet vertical segments. Default: |
geneset.segments.color |
String indicating any R-supported color to be used for the geneSet segments. Default: |
ranking.color |
String indicating any R-supported color to be used for the ranked list plot (histogram). Default: |
gradient.colors |
Two-values string vector indicating the shadows of palettes to use for the genset gradient. Possible values: 'Blues', 'Greens', 'Greys', 'Oranges', 'Purples', 'Reds'. Default: |
table.font.size |
Numeric value to indicate the font size to use in the stat table plot. Default: |
title.position |
String indicating the position of the title: 'left', 'center', 'right'. Default: |
title |
String indicating the title to use. Default: |
combined.plot.height.ratios |
Numeric vector with 4 values used to define the 'real heights' of each panel. The order corresponds to: enrichment score panel, geneset panel (all together), rank panel, stat table panel. Default |
image.file.name |
String indicating the full path for the export of a pdf file of the combined plot. Default: |
image.width |
Numeric value to indicate the width (in inches) to use for the exported pdf file. Active only when |
image.height |
Numeric value to indicate the height (in inches) t use for the exported pdf file. Active only when |
return.all.objects |
Logical value to indicate whether the function should return only the combined plot (ggplot object), or all the different panels and the combined plot in a list. Default: |
geneset.id |
Numeric value or a string identifying the Nth geneSet (numeric) or a specific id (string) if geneSet in the result table. Default value: |
Either a ggplot-object with the final combined plot, or a list with the three panels separated and the combined plot: list(enrichment.panel, geneset.panel.list - list with one element per geneset -, rank.panel, stat.table, combined.plot)
.
data(geneList, package = "DOSE")
msigdb_hallmarks =
msigdbr::msigdbr(species = "Homo sapiens", category = "H") %>%
dplyr::select(gs_name, human_entrez_gene)
gsea_H = clusterProfiler::GSEA(geneList = geneList,
TERM2GENE = msigdb_hallmarks,
minGSSize = 3,
maxGSSize = 800,
pAdjustMethod = "BH",
pvalueCutoff = 0.05,
verbose = T)
plot.multi.gsea(gsea_H, geneset.id = c("HALLMARK_ADIPOGENESIS", "HALLMARK_CELL_CYCLE"))
plot.multi.gsea(gsea_H, geneset.id = c(1,2,7))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.