bubblePlot: Generate pathfindR-like bubble plot from pathfindR results

View source: R/bubblePlot.R

bubblePlotR Documentation

Generate pathfindR-like bubble plot from pathfindR results

Description

One odd choice in pathfindR is that the (very helpful) bubble plots it generates get saved as an image file to your computer, but are otherwise inaccessible to your R session. This function makes a similar bubble plot, though with a bit more flexibility in how it's plotted and using a viridis colour scale instead of the hard-to-read grey-red default.

Usage

bubblePlot(pathRes, nRes = 10, xlim = NULL, ylim = NULL, ...)

Arguments

pathRes

A dataframe, the output of dge_RunPathfinder() or, more likely, dge_CleanPathfinder().

nRes

Numeric; number of pathways you would like to output.

xlim

Length-2 numeric vector; limits of the x-axis (the fold-change; technically the y axis but we've flipped it here and so I'm naming as the graph outputs rather than behind the scenes...)

ylim

Length-2 numeric vector; limits of the y-axis (not usually set; see nRes instead)

...

Additional args to pass to scale_color_viridis_c(), such as limits to set the bounds of the colour scale

Value

A ggplot object showing the fold enrichment, # genes, and p values of the top nRes pathways identified by pathfindeR.

Examples


pathRes <- system.file("extdata", "pathRes.Rds",
                      package = "seqHelpers") |>
    readRDS()

    # Raw output from dge_RunPathfinder:
    bubblePlot(pathRes)


NKInstinct/seqHelpers documentation built on Aug. 20, 2022, 4:30 a.m.