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
) iftest = "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
runsmet.Ttests.Anal
with the chosen test parameters. Fortest = "anova"
,met.ANOVA.Anal
must have been applied previously on the mSetObj.- paired
(Logical) Is the data paired (
TRUE
) or not (FALSE
). Only applicable fortest = "ttest"
.- nonpar
(Logical) Use a non-parametric test (
TRUE
) or not (FALSE
). Only applicable fortest = "ttest"
.- equal.var
(Logical) The two groups have equal variance (
TRUE
) or not (FALSE
). Only applicable fortest = "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
). IfNULL
, the namePlots/Volcano_grp1_vs_grp2
is assigned.- format
(
"png"
or"pdf"
) image file format (ifexport = 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
). IfNULL
, 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
orFALSE
) Shall the plot be returned in the RStudio 'Plots' pane?- export
(Logical,
TRUE
orFALSE
) 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)
.
References
adapted from plot_volcano
(https://bioconductor.org/packages/DEP/).
Author
Nicolas T. Wirth mail.nicowirth@gmail.com Technical University of Denmark License: GNU GPL (>= 2)