met.plot_volcano: Volcano Plot

met.plot_volcanoR Documentation

Volcano Plot

Description

met.plot_volcano generates a volcano plot for a specified contrast.

Usage

met.plot_volcano(
  mSetObj = NA,
  grp1,
  grp2,
  test = "ttest",
  paired = FALSE,
  nonpar = FALSE,
  equal.var = TRUE,
  log2fc.thresh = 1,
  threshp = 0.05,
  pval.type = "fdr",
  imgName = NULL,
  format = "pdf",
  add_names = TRUE,
  label_size = 3,
  dpi = NULL,
  width = NA,
  plot = TRUE,
  export = TRUE,
  silent = FALSE,
  test_condition = FALSE
)

Arguments

mSetObj

Input name of the created mSet object, Data container after ANOVA analysis (met.ANOVA.Anal) if test = "anova".

grp1

(Character) Enter name of the first group for the contrast grp1 vs. grp2. If both group arguments are empty, the first two names in the list of groups are selected.

grp2

(Character) Enter name of the second group for the contrast grp1 vs. grp2. If both group arguments are empty, the first two names in the list of groups are selected.

test

(Character) Choose a statistical tests. For test = "ttest", met.plot_volcano runs met.Ttests.Anal with the chosen test parameters. For test = "anova", met.ANOVA.Anal must have been applied previously on the mSetObj.

paired

(Logical) Is the data paired (TRUE) or not (FALSE). Only applicable for test = "ttest".

nonpar

(Logical) Use a non-parametric test (TRUE) or not (FALSE). Only applicable for test = "ttest".

equal.var

(Logical) The two groups have equal variance (TRUE) or not (FALSE). Only applicable for test = "ttest".

log2fc.thresh

(Numeric) Enter a relevance threshold for log2 fold changes, highlighted in the plot by vertical lines and colored compounds

threshp

(Numeric) Enter a significance threshold for features based on T-test or ANOVA test results, highlighted in the plot by an horizontal line and colored compounds

pval.type

(Character) Display and apply significance threshold to "raw" p values or adjusted p values ("fdr").

imgName

(Character) Enter a name for the image file (if export = TRUE). If NULL, the name Plots/Volcano_grp1_vs_grp2 is assigned.

format

("png" or "pdf") image file format (if export = TRUE).

add_names

(Logical) Display labels of significant features (TRUE) or not (FALSE).

label_size

(Numeric) Font size for feature labels (if add_names = TRUE).

dpi

(Numeric) resolution of the image file (if export = TRUE). If NULL, the resolution will be chosen automatically based on the chosen file format (300 dpi for PNG, 72 dpi for PDF)

width

(Numeric) width of the the image file in inches (if export = TRUE).

plot

(Logical, TRUE or FALSE) Shall the plot be returned in the RStudio 'Plots' pane?

export

(Logical, TRUE or FALSE) Shall the plot be exported as PDF or PNG file?

silent

(Logical) Shall the results of met.Ttests.Anal be printed in the console (TRUE) or not (FALSE)?

test_condition

(Logical) Add a subtitle with the applied data transformation and scaling methods be displayed below the plot title (TRUE) or not (FALSE).

Value

The input mSet object with added volcano plot (generated by ggplot). The plot can be retrieved from within R via print(mSetObj$imgSet$volcano$grp1_vs_grp2.plot).

Author(s)

Nicolas T. Wirth mail.nicowirth@gmail.com Technical University of Denmark License: GNU GPL (>= 2)

References

adapted from plot_volcano (https://bioconductor.org/packages/DEP/).


NicWir/VisomX documentation built on Dec. 8, 2024, 1:27 a.m.