Contents

The visualizations in notameViz can be used to monitor the processing and explore the data, inspect individual features as well as plot results. Please see the notame website and protocol article for more information (Klåvus et al. 2020). Similar functionality is available in miaViz and scater packages.

1 Installation

To install notameViz, install BiocManager first, if it is not installed. Afterwards use the install function from BiocManager and load notameViz.

if (!requireNamespace("BiocManager", quietly = TRUE))
    install.packages("BiocManager")
BiocManager::install("notameViz")
library(notame)
library(notameViz)
library(notameStats)

ppath <- tempdir()
init_log(log_file = file.path(ppath, "log.txt"))
## INFO [2025-10-10 19:14:31] Starting logging
data(hilic_neg_sample, package = "notame")
data(toy_notame_set, package = "notame")

2 Preprocessing visualizations

Preprocessing visualizations are used to monitor preprocessing such as drift correction and explore the data. Preprocessing visualizations return ggplot2 objects. Preprocessing is performed separately for each mode.

plot_sample_boxplots(hilic_neg_sample, order_by = "Group", fill_by = "Group")

The function save_QC_plots conveniently saves common visualizations after each round of processing, ignoring flagged features by default. You can see this in action in the project example vignette in the notame package. 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.

3 Results visualizations

Results visualizations return ggplot2 objects. Common visalizations include effect heatmaps and volcano plots. Manhattan plots and cloud plots can be used to relate results to biochemical features such as m/z and RT and are plotted separately for each mode. To save these functions to a PDF file, use save_plot.

lm_results <- notameStats::perform_lm(notame::drop_qcs(toy_notame_set), 
  formula_char = "Feature ~ Group")
## INFO [2025-10-10 19:14:33] Starting linear regression.
## INFO [2025-10-10 19:14:36] Linear regression performed.
with_results <- notame::join_rowData(toy_notame_set, lm_results)

p <- volcano_plot(with_results,
  x = "GroupB.estimate", p = "GroupB.p.value", p_fdr = "GroupB.p.value_FDR")
## Warning: None of the FDR-adjusted p-values are below the significance level,
## not plotting the horizontal line.
# save_plot(p, file = "volcano_plot.pdf")

p 

4 Feature-wise visualizations

The following visualizations are applied to each feature and directly saved to a PDF file, one page per feature. If save = FALSE, a list of plots is returned:

beeswarm_list <- save_beeswarm_plots(toy_notame_set[1:10],
  save = FALSE, x = "Group", color = "Group")
## Just a remainder, creating a long list of plots takes a lot of memory!
beeswarm_list[[1]]

5 Color scales

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("notame.color_scale_dis") <- 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):

6 Session information

## R version 4.5.1 Patched (2025-08-23 r88802)
## Platform: x86_64-pc-linux-gnu
## Running under: Ubuntu 24.04.3 LTS
## 
## Matrix products: default
## BLAS:   /home/biocbuild/bbs-3.22-bioc/R/lib/libRblas.so 
## LAPACK: /usr/lib/x86_64-linux-gnu/lapack/liblapack.so.3.12.0  LAPACK version 3.12.0
## 
## locale:
##  [1] LC_CTYPE=en_US.UTF-8       LC_NUMERIC=C              
##  [3] LC_TIME=en_GB              LC_COLLATE=C              
##  [5] LC_MONETARY=en_US.UTF-8    LC_MESSAGES=en_US.UTF-8   
##  [7] LC_PAPER=en_US.UTF-8       LC_NAME=C                 
##  [9] LC_ADDRESS=C               LC_TELEPHONE=C            
## [11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C       
## 
## time zone: America/New_York
## tzcode source: system (glibc)
## 
## attached base packages:
## [1] stats4    stats     graphics  grDevices utils     datasets  methods  
## [8] base     
## 
## other attached packages:
##  [1] notameStats_0.99.1          notameViz_0.99.5           
##  [3] notame_0.99.6               SummarizedExperiment_1.39.2
##  [5] Biobase_2.69.1              GenomicRanges_1.61.5       
##  [7] Seqinfo_0.99.2              IRanges_2.43.5             
##  [9] S4Vectors_0.47.4            BiocGenerics_0.55.3        
## [11] generics_0.1.4              MatrixGenerics_1.21.0      
## [13] matrixStats_1.5.0           ggplot2_4.0.0              
## [15] BiocStyle_2.37.1           
## 
## loaded via a namespace (and not attached):
##  [1] beeswarm_0.4.0       gtable_0.3.6         xfun_0.53           
##  [4] bslib_0.9.0          lattice_0.22-7       vctrs_0.6.5         
##  [7] tools_4.5.1          parallel_4.5.1       tibble_3.3.0        
## [10] pkgconfig_2.0.3      Matrix_1.7-4         RColorBrewer_1.1-3  
## [13] S7_0.2.0             lifecycle_1.0.4      stringr_1.5.2       
## [16] compiler_4.5.1       farver_2.1.2         tinytex_0.57        
## [19] codetools_0.2-20     vipor_0.4.7          htmltools_0.5.8.1   
## [22] sass_0.4.10          yaml_2.3.10          pillar_1.11.1       
## [25] crayon_1.5.3         jquerylib_0.1.4      tidyr_1.3.1         
## [28] BiocParallel_1.43.4  DelayedArray_0.35.3  cachem_1.1.0        
## [31] magick_2.9.0         abind_1.4-8          tidyselect_1.2.1    
## [34] digest_0.6.37        stringi_1.8.7        dplyr_1.1.4         
## [37] purrr_1.1.0          bookdown_0.45        labeling_0.4.3      
## [40] fastmap_1.2.0        grid_4.5.1           cli_3.6.5           
## [43] SparseArray_1.9.1    magrittr_2.0.4       S4Arrays_1.9.1      
## [46] dichromat_2.0-0.1    withr_3.0.2          scales_1.4.0        
## [49] ggbeeswarm_0.7.2     rmarkdown_2.30       lambda.r_1.2.4      
## [52] XVector_0.49.1       futile.logger_1.4.3  evaluate_1.0.5      
## [55] knitr_1.50           viridisLite_0.4.2    rlang_1.1.6         
## [58] futile.options_1.0.1 Rcpp_1.1.0           glue_1.8.0          
## [61] BiocManager_1.30.26  formatR_1.14         jsonlite_2.0.0      
## [64] R6_2.6.1

References

Klåvus, Anton, Marietta Kokla, Stefania Noerman, Ville M Koistinen, Marjo Tuomainen, Iman Zarei, Topi Meuronen, et al. 2020. “‘Notame’: Workflow for Non-Targeted Lc–Ms Metabolic Profiling.” Metabolites 10 (4): 135.