plot_sample_mean_or_boxplot {proBatch}R Documentation

Plot per-sample mean or boxplot (showing median and quantiles) vs order (if the real running order available)

Description

Plot per-sample mean or boxplot (showing median and quantiles) vs order (if the real running order available)

Usage

plot_sample_mean(data_matrix, sample_annotation = NULL,
  sample_id_col = "FullRunName", order_col = "order",
  batch_col = "MS_batch", facet_col = NULL, color_by_batch = FALSE,
  color_scheme = "brewer", theme = "classic", plot_title = NULL,
  order_per_facet = FALSE, vline_color = "grey", ylimits = NULL)

plot_boxplot(df_long, sample_annotation = NULL,
  sample_id_col = "FullRunName", measure_col = "Intensity",
  order_col = "order", batch_col = "MS_batch", facet_col = NULL,
  color_by_batch = TRUE, color_scheme = "brewer", theme = "classic",
  plot_title = NULL, order_per_facet = FALSE)

Arguments

data_matrix

features (in rows) vs samples (in columns) matrix, with feature IDs in rownames and file/sample names as colnames. in most function,

sample_annotation

data matrix with 1) sample_id_col (this can be repeated as row names) 2) biological and 3) technical covariates (batches etc)

sample_id_col

name of the column in sample_annotation file, where the filenames (colnames of the data matrix are found)

order_col

column where running order is specified.

batch_col

column in sample_annotation that should be used for batch comparison

facet_col

recommended if more than one batch covariate is present. Faceting is most suited to examine instruments separately

color_by_batch

should the each batch be represented with its own color?

color_scheme

named vector, names corresponding to unique batch values as specified in sample_annotation

theme

ggplot theme, by default classic. Can be easily overriden (see examples)

plot_title

Title of the plot (usually, processing step + representation level (fragments, transitions, proteins))

order_per_facet

if order is defined ignoring facets (usually instrument), re-define order per-batch

vline_color

color of vertical lines, typically denoting different MS batches in ordered runs; should be NULL for experiments without intrinsic order

ylimits

range of y-axis to plot feature-level trends

df_long

data frame where each row is a single feature in a single sample, thus it has minimally, sample_id_col, feature_id_col and measure_col, but usually also m_score (in OpenSWATH output result file)

measure_col

if df_long is among the parameters, it is the column with expression/abundance/intensity, otherwise, it is used internally for consistency

Details

functions for quick visual assessment of trends associated, overall or specific covariate-associated (see batch_col and facet_col)

Value

ggplot2 class object. Thus, all aesthetics can be overriden

See Also

ggplot

Examples

mean_plot <- plot_sample_mean(example_proteome_matrix, example_sample_annotation, 
order_col = 'order', batch_col = "MS_batch")

boxplot <- plot_boxplot(example_proteome, example_sample_annotation, 
batch_col = "MS_batch")


[Package proBatch version 1.0.0 Index]