| plot_PVCA.df {proBatch} | 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"
)
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)