bubblePlot | R Documentation |
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.
bubblePlot(pathRes, nRes = 10, xlim = NULL, ylim = NULL, ...)
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 |
A ggplot object showing the fold enrichment, # genes, and p values of the top nRes pathways identified by pathfindeR.
pathRes <- system.file("extdata", "pathRes.Rds", package = "seqHelpers") |> readRDS() # Raw output from dge_RunPathfinder: bubblePlot(pathRes)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.