Skip to contents

This script allows you to perform different data visualizations using the results of the MetaProViz analysis Volcano plot visualization

Usage

VizVolcano(
  PlotSettings = "Standard",
  InputData,
  SettingsInfo = NULL,
  SettingsFile_Metab = NULL,
  InputData2 = NULL,
  y = "p.adj",
  x = "Log2FC",
  xlab = NULL,
  ylab = NULL,
  xCutoff = 0.5,
  yCutoff = 0.05,
  Connectors = FALSE,
  SelectLab = "",
  PlotName = "",
  Subtitle = "",
  ComparisonName = c(InputData = "Cond1", InputData2 = "Cond2"),
  ColorPalette = NULL,
  ShapePalette = NULL,
  Theme = NULL,
  SaveAs_Plot = "svg",
  FolderPath = NULL,
  Features = "Metabolites",
  PrintPlot = TRUE
)

Arguments

SettingsInfo

Optional: NULL or Named vector including at least one of those three information for Settings="Standard" or "Compare": c(color ="ColumnName_SettingsFile_Metab", shape = "ColumnName_SettingsFile_Metab", individual="ColumnName_SettingsFile_Metab"). For Settings="PEA" a named vector with: PEA_Pathway="ColumnName_InputData2"=each pathway will be plotted, PEA_score="ColumnName_InputData2", PEA_stat= "ColumnName_InputData2"= usually p.adj column, "PEA_Feature="ColumnName_InputData2"= usually Metabolites), optionally you can additionally include c(color_Metab="ColumnName_SettingsFile_Metab", shape= "ColumnName_SettingsFile_Metab").Default = NULL

SettingsFile_Metab

Optional: DF with column including the Metabolite names (needs to match Metabolite names and Metabolite column name of InputData) and other columns with required PlotSettingInfo. Default = NULL

InputData2

Optional: DF to compare to main Input_data with the same column names x and y (Settings="Compare") and metabolites as row names or Pathway enrichment analysis results (Settings="PEA"). Default = NULL

y

Optional: Column name including the values that should be used for y-axis. Usually this would include the p.adjusted value. Default = "p.adj"

x

Optional: Column name including the values that should be used for x-axis. Usually this would include the Log2FC value. Default = "Log2FC"

xlab

Optional: String to replace x-axis label in plot. Default = NULL

ylab

Optional: String to replace y-axis label in plot. Default = NULL

xCutoff

Optional: Number of the desired log fold change cutoff for assessing significance. Default = 0.5

yCutoff

Optional: Number of the desired p value cutoff for assessing significance. Default = 0.05

Connectors

Optional: TRUE or FALSE for whether Connectors from names to points are to be added to the plot. Default = FALSE

SelectLab

Optional: If set to NULL, feature labels will be plotted randomly. If vector is provided, e.g. c("MetaboliteName1", "MetaboliteName2"), selected names will be plotted. If set to default "", no feature names will be plotted. Default = ""

PlotName

Optional: String which is added to the output files of the plot. Default = ""

Subtitle

Optional: Default = ""

ComparisonName

Optional: Named vector including those information about the two datasets that are compared on the plots when choosing Settings= "Compare". Default = c(InputData="Cond1", InputData2= "Cond2")

ColorPalette

Optional: Provide customiced color-palette in vector format. Default = NULL

ShapePalette

Optional: Provide customiced shape-palette in vector format. Default = NULL

Theme

Optional: Selection of theme for plot, e.g. theme_grey(). You can check for complete themes here: https://ggplot2.tidyverse.org/reference/ggtheme.html. Default = NULL

SaveAs_Plot

Optional: Select the file type of output plots. Options are svg, pdf, png or NULL. Default = "svg"

FolderPath

Optional: Path to the folder the results should be saved at. default: NULL

Features

Optional: Name of the features that are plotted, e.g. "Metabolites", "RNA", "Proteins", "Genes", etc. Default = "metabolites"

Settings

Optional: Choose between "Standard" (InputData), "Compare" (plot two comparisons together InputData and InputData2) or "PEA" (Pathway Enrichment Analysis) Default = "Standard"

Input_data

DF with metabolites as row names and columns including Log2FC and stat (p-value, p.adjusted) value columns.

FeatureID

Optional: Column name including the feature names, e.g. metabolite names. Default = "Metabolite"

Value

List with two elements: Plot and Plot_Sized

Examples

Intra <- ToyData("IntraCells_DMA")
Res <- VizVolcano(InputData=Intra)