View source: R/proteome_wide_diagnostics.R
plot_PVCA.df | R Documentation |
plot PVCA, when the analysis is completed
plot_PVCA.df(pvca_res, colors_for_bars = NULL, filename = NULL,
width = NA, height = NA, units = c("cm", "in", "mm"),
plot_title = NULL, theme = "classic", base_size = 20)
pvca_res |
data frame of weights of Principal Variance Components, result
of |
colors_for_bars |
four-item color vector, specifying colors for the following categories: c('residual', 'biological', 'biol:techn', 'technical') |
filename |
path where the results are saved. If null the object is returned to the active window; otherwise, the object is save into the file. Currently only pdf and png format is supported |
width |
option determining the output image width |
height |
option determining the output image width |
units |
units: 'cm', 'in' or 'mm' |
plot_title |
title of the plot (e.g., processing step + representation level (fragments, transitions, proteins) + purpose (meanplot/corrplot etc)) |
theme |
ggplot theme, by default |
ggplot
object with bars as weights, colored by bio/tech factors
matrix_test <- example_proteome_matrix[1:150, ]
pvca_df_res <- prepare_PVCA_df(matrix_test, example_sample_annotation,
technical_factors = c('MS_batch', 'digestion_batch'),
biological_factors = c("Diet", "Sex", "Strain"),
pca_threshold = .6, variance_threshold = .01, fill_the_missing = -1)
colors_for_bars = c('grey', 'green','blue','red')
names(colors_for_bars) = c('residual', 'biological','biol:techn','technical')
pvca_plot <- plot_PVCA.df(pvca_df_res, colors_for_bars)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.