PlotPathwayMetaAnalysis: PlotPathwayMetaAnalysis

View source: R/meta_pathway.R

PlotPathwayMetaAnalysisR Documentation

PlotPathwayMetaAnalysis

Description

Function to create summary plot of MS Peaks to Paths meta-analysis at the pathway level. This function creates a summary plot of the MS Peaks to Paths meta-analysis at the pathway level. The plot can either be a heatmap or a network, both of which can be made interactive. NETWORK: The size of the nodes in the network correspond to the number of studies in which that pathway was significant. The color of the nodes correspond to the meta-p-value for each pathway, with (default coloring) red being the most significant and yellow the least.

Usage

PlotPathwayMetaAnalysis(
  mSetObj = NA,
  imgName,
  plotType = "heatmap",
  heatmap_colorType = "brewer",
  heatmap_palette = "RdYlBu",
  heatmap_interactive = FALSE,
  heatmap_square = TRUE,
  heatmap_allPaths = TRUE,
  heatmap_npaths = 25,
  heatmap_vertical = TRUE,
  heatmap_fontSize = 9,
  pvalCutoff = 0.05,
  overlap = 0.25,
  networkType = "static",
  layout = "kk",
  net_palette = "YlOrRd",
  netTextSize = 2.5,
  netPlotSize = 7.5,
  bubble_interactive = FALSE,
  bubbleMaxPaths = 15,
  bubble_colorType = "brewer",
  bubble_palette = "RdBu",
  bubbleFontSize = 9,
  bubblePlotSize = 7,
  format = "png",
  width = 7,
  height = 5,
  dpi = 300
)

Arguments

mSetObj

Input the name of the created mSetObj object.

imgName

name of image.

plotType

Use "heatmap" to create a heatmap summary, "network" to create a network summary, or "bubble" to create a bubble plot summary of the meta-analysis results.

heatmap_colorType

Character, "brewer" for R Color Brewer scales or "viridis" for viridis color scales. Used for creating the heatmap color scheme.

heatmap_palette

Character, input the preferred color palette according to R Color Brewer or viridis (e.g. "RdBu").

heatmap_interactive

Boolean. FALSE to create a non-interactive plot and TRUE for plotly generated interactive plot.

heatmap_square

Boolean. TRUE for the heatmap to be squares versus rectangles (FALSE).

heatmap_allPaths

Boolean. TRUE to use all paths when plotting the heatmap. FALSE to use a subset of paths, number defined in npaths.

heatmap_npaths

Numeric. The number of pathways to subset the pathway results.

heatmap_vertical

Boolean. TRUE, heatmap plot will be vertical. FALSE, heatmap plot will be horizontal.

heatmap_fontSize

Numeric, input the preferred font size to be used in the heatmap plot.

pvalCutoff

The size of the nodes in the network correspond to the number of studies in which that pathway was significant. This pvalCutoff (Numeric) is thus used to determine whether or not a pathway was found to be significant in each individual study.

overlap

Numeric, this number is used to create edges between the nodes. By default it is set to 0.25, meaning that if 2 pathways (nodes) share 25 the same compounds/empirical compounds, they will be connected by a node.

networkType

Character, "static" to create a static image or "interactive" to create an interactive network saved as an html in your working directory.

layout

Character, layout from ggraph. "kk" for the spring-based algorithm by Kamada and Kawai as default. "drl" for force directed algorithm from the DrL toolbox. "lgl" for Large Graph Layout. "fr" for force-directed of Fruchterman and Reingold.

net_palette

Character, input the color code for the nodes in the network. Default is "YlOrRd". Uses the hcl palettes from the grDevices. Use hcl.pals() to view the name of all available palettes.

netTextSize

Numeric, input the preferred font size to be used in the network plot.

netPlotSize

Numeric, input the preferred dimensions (in inches) of the network to be saved.

bubble_interactive

logical

bubbleMaxPaths

maximum number of pathways

bubble_colorType

Character, "brewer" for R Color Brewer scales or "viridis" for viridis color scales. Used for creating the bubble plot color scheme.

bubble_palette

Character, use two/three colors max if using R ColorBrewer palettes for pleasing looking plots.

bubbleFontSize

font size of the bubble plot

bubblePlotSize

plot size of the bubble plot

format

format of the image

width

width of the image

height

height of the image

dpi

dpi of the image

Author(s)

Jasmine Chong, Jeff Xia jeff.xia@mcgill.ca McGill University, Canada License: GNU GPL (>= 2)


xia-lab/MetaboAnalystR documentation built on Dec. 23, 2024, 3:44 p.m.