xGSEAdotplot | R Documentation

## Function to visualise GSEA results using dot plot

### Description

`xGSEAdotplot` is supposed to visualise GSEA results using dot plot. It returns an object of class "ggplot" or a list of "ggplot" objects.

### Usage

    xGSEAdotplot(eGSEA, top = 1, colormap = "lightblue-darkblue", zlim =
    NULL,
    ncolors = 64, xlab = NULL, title = NULL, subtitle = c("leading",
    "enrichment", "both", "none"), clab = "5-star\nrating",
    x.scale = c("normal", "sqrt", "log"), peak = TRUE, peak.color = "red",
    leading = FALSE, leading.size = 2, leading.color = "black",
    leading.alpha = 0.6, leading.padding = 0.2, leading.arrow = 0.01,
    leading.force = 0.01, leading.query = NULL, leading.query.only = FALSE,
    leading.edge.only = FALSE, compact = FALSE, font.family = "sans",
    signature = TRUE, ...)

### Arguments

`eGSEA` | an object of class "eGSEA"
`top` | the number of the top enrichments to be visualised. Alternatively, the gene set names can be queried
`colormap` | short name for the colormap. It can be one of "jet" (jet colormap), "bwr" (blue-white-red colormap), "gbr" (green-black-red colormap), "wyr" (white-yellow-red colormap), "br" (black-red colormap), "yr" (yellow-red colormap), "wb" (white-black colormap), and "rainbow" (rainbow colormap, that is, red-yellow-green-cyan-blue-magenta). Alternatively, any hyphen-separated HTML color names, e.g. "blue-black-yellow", "royalblue-white-sandybrown", "darkgreen-white-darkviolet". A list of standard color names can be found in http://html-color-codes.info/color-names
`zlim` | the minimum and maximum z values for which colors should be plotted
`ncolors` | the number of colors specified over the colormap
`xlab` | the label for x-axis. If NULL, it is 'Target ranks'
`title` | the title. If NULL, it is term name followed by the number of its annotations
`subtitle` | the subtitle. It can be used to show 'leading' info, 'enrichment' info or 'both'
`clab` | the label for colorbar. By default, it is '5-star ratings'
`x.scale` | how to transform the x scale. It can be "normal" for no transformation, "sqrt" for square root transformation, and "log" for log-based transformation
`peak` | logical to indicate whether the peak location is shown
`peak.color` | the peak color
`leading` | logical to indicate whether the leading targets are texted. Alterntively, leading can be numeric to restict the top targets displayed
`leading.size` | the size of leading targets' texts. It only works when the parameter 'leading' is enabled
`leading.color` | the label color of leading targets' texts
`leading.alpha` | the 0-1 value specifying transparency of leading targets' texts
`leading.padding` | the padding around the leading targets' texts
`leading.arrow` | the arrow pointing to the leading targets
`leading.force` | the repelling force between leading targets' texts
`leading.query` | which genes in query will be labelled. By default, it sets to NULL meaning all genes will be displayed. If labels in query can not be found, then all will be displayed
`leading.query.only` | logical to indicate whether only genes in query will be displayed. By default, it sets to FALSE. It only works when labels in query are enabled/found
`leading.edge.only` | logical to indicate whether only the leading edge will be shown. By default, it sets to FALSE
`compact` | logical to indicate whether the compact/void theme is used. If TRUE, axes and legend info will be hidden
`font.family` | the font family for texts
`signature` | logical to indicate whether the signature is assigned to the plot caption. By default, it sets TRUE showing which function is used to draw this graph
`...` | additional paramters associated with ggrepel::geom_text_repel. If queried, it has high priority (eg, color='darkred',size=2,alpha=0.6,fontface='bold')

### Value

an object of class "ggplot" or a list of "ggplot" objects.

### Note

none

### See Also

`xPierGSEA`

### Examples

    ## Not run:
    # Load the library
    library(Pi)

    ## End(Not run)
    RData.location <- "http://galahad.well.ox.ac.uk/bigdata_dev"
    ## Not run:
    gp <- xGSEAdotplot(eGSEA, top=1)
    #gp <- xGSEAdotplot(eGSEA, top=1, peak=FALSE, compact=TRUE, signature=FALSE)
    gp

    ls_gp <- xGSEAdotplot(eGSEA, top=1:4, signature=FALSE)
    library(gridExtra)
    grid.arrange(grobs=ls_gp, ncol=2)

    ## End(Not run)