knitr::opts_chunk$set(
  collapse = TRUE,
  comment = "#>"
)

Visualizations

This vignette lists all the visualizations found in the package. The visualizations have a few elements in common:

Color scales and other scales can be set separately for each function call, and the defaults are set as options in the package. The scales are ggplot scales, returned by e.g. scale_color_x. It is also possible to change the scales globally for the complete project. To do this, use e.g. options("amp.color_scale") <- scale_color_brewer(palette = "Dark2"). Below is a list of all the scales used in the package and their default values (con = continuous, dis = discrete, div = diverging):

List of common visualizations that take a MetaboSet object as their first argument and return a ggplot object, see individual documentation for more details:

Visualizations for results of statistical tests or correlations:

To save these functions to a PDF file, use save_plot

The following visualizations are applied to each feature and directly saved to a PDF file, one page per feature.

One function to rule them all

The function visualizations automatically runs many of the visualizations for an object, ignoring flagged features. It also allows you to merge all saved plots into one file by setting merge = TRUE. NOTE that this requires you to install external tools. For Windows, install pdftk. For linux, make sure pdfunite is installed.

If you want to modify the visualizations, it is a very good idea to create a project specific version, e.g. myproject_visualizations. To do this, simply run visualizations without parentheses and copy-paste the code to an external file for modifications. You might want to add visualizations or modify the size of the figures to be saved.



antonvsdata/amp documentation built on Jan. 8, 2020, 3:15 a.m.