Pattern hunter, plot correlation heatmap
Source:R/metabolomics_plots.R
met.plot_CorrHeatMap_Samples.Rd
met.plot_CorrHeatMap_Samples
visualizes the correlations between samples.
Usage
met.plot_CorrHeatMap_Samples(
mSetObj = NA,
imgName = "correlation_samples",
format = "pdf",
dpi = 72,
width = NA,
cor.method = "pearson",
colors = "bwm",
viewOpt = "overview",
fix.col = FALSE,
no.clst = FALSE,
corrCutoff = 0,
plot = TRUE,
export = TRUE
)
Arguments
- mSetObj
Input name of the created mSet object.
- imgName
(Character) Enter a name for the image file (if
export = TRUE
).- format
(Character,
"png"
or"pdf"
) image file format (ifexport = 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
).- cor.method
(Character) Indicate the correlation method,
'pearson'
,'spearman'
, or'kendall'
.- colors
(Character) Indicate the colors for the heatmap,
"bwm"
for default,"gbr"
for red/green,"heat"
for heat colors,"topo"
for topo colors, and"gray"
for gray scale.- viewOpt
(Character) Indicate
"overview"
to get an overview of the heatmap, and"detail"
to get a detailed view of the heat map.- fix.col
(Logical) Fix colors (
TRUE
) or not (FALSE
).- no.clst
(Logical) Indicate if the correlations should be clustered (
TRUE
) or not (FALSE
).- corrCutoff
(Numeric) Set correlation cut off.
- 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?
Value
The input mSet object with added heat map showing the correlations between samples. The plot can be retrieved from within R via print(mSetObj$imgSet$corr.heatmap_samples.plot)
.
References
adapted from PlotCorrHeatMap
(https://github.com/xia-lab/MetaboAnalystR).
Author
Nicolas T. Wirth mail.nicowirth@gmail.com Technical University of Denmark License: GNU GPL (>= 2)