plot.gsea | R Documentation |
Function to plot GSEA results (see clusterprofiler).
## S3 method for class 'gsea'
plot(
gsea.results,
geneset.id = NULL,
enrichment.geom = "line",
enrichment.color = "green",
enrichment.geom.size = 1,
enrichment.plot.zero.line = FALSE,
enrichment.zero.line.color = "gray",
enrichment.zero.line.width = 0.5,
enrichment.annotations.vjust.offset = 0,
geneset.segments.width = 0.3,
geneset.segments.color = "black",
rank.max.color = "indianred",
ranking.color = "gray",
gradient.colors = c("Reds", "Blues"),
title.position = "center",
title = NA,
image.file.name = NULL,
image.width = 7,
image.height = 5,
return.all.objects = FALSE
)
gsea.results |
A |
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: |
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: |
enrichment.color |
String indicating any R-supported color to be used for the enrichment score plot. 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 |
enrichment.annotations.vjust.offset |
Numeric value to add to the vjust (vertical positioning) of the enrichment plot annotations (P, Padj, q, NES, set size). Positive values will shift-down the annotations. Default: |
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: |
rank.max.color |
String indicating any R-supported color to be used for the max rank dotted lines and annotation. 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: |
title.position |
String indicating the position of the title: 'left', 'center', 'right'. Default: |
title |
String indicating the title to use. 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: |
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, rank.panel, 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.gsea(gsea_H, geneset.id = "HALLMARK_ADIPOGENESIS")
plot.gsea(gsea_H, geneset.id = 28)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.