Skip to contents

plot_dynamic_range() is a GGplot2 implementation for plotting the normalization effects on CVs by abundance, visualized as a 2d density plot. Layered on top is a loess smoothed regression of the CVs by abundance, with the median CV shown in red and the dynamic range represented as a box plot on top. The point of this plot is to examine how CVs were minimized through out the abundance profile. Some normalization methods function well at high abundance yet leave retain high CVs at lower abundance.

Usage

plot_dynamic_range(data = NULL, ...)

Arguments

data

tidyproteomics data object

...

passthrough for ggsave see plotting

Value

a (tidyproteomics data-object | ggplot-object)

Examples

library(dplyr, warn.conflicts = FALSE)
library(tidyproteomics)
hela_proteins %>%
  normalize(.method = c("linear", "loess", "randomforest")) %>%
  plot_dynamic_range()
#>  Normalizing quantitative data
#>  ... using linear regression
#>  ... using linear regression [220ms]
#> 
#>  ... using loess regression
#>  ... using loess regression [1.3s]
#> 
#>  ... using randomforest regression
#>  ... using randomforest regression [34.3s]
#> 
#>  Selecting best normalization method
#>  Selecting best normalization method ... done
#> 
#>   ... selected randomforest
#> Warning: All aesthetics have length 1, but the data has 40608 rows.
#>  Please consider using `annotate()` or provide this layer with data containing
#>   a single row.