sbc_plot: Plot QCRSC corrected outputs

Description Usage Arguments Value Examples

View source: R/sbc_plot.R

Description

Plot the output from signal batch correction for the selected or the first 100 features.

Usage

1
2
3
4
5
6
7
8
9
sbc_plot(
  df,
  corrected_df,
  classes,
  batch,
  indexes = NULL,
  qc_label = "QC",
  output = "sbcms_plots.pdf"
)

Arguments

df

A matrix-like (e.g. an ordinary matrix, a data frame) or RangedSummarizedExperiment-class object with all values of class numeric() or integer() of peak intensities, areas or other quantitative characteristic.

corrected_df

Output from QCRSC function.

classes

character(), vector of class labels. Must be the same length as the number of sample in the input peak table. If input is SummarizedExperiment object, use SummarizedExperiment_object$meta_data_column_name.

batch

numeric() or character(), a vector indicating the batch each sample was measured in. If only one batch was measured then all values should be set to 1

indexes

numeric(), a vector defining which features to plot. If set to NULL will plot the first 100.

qc_label

character(1) or NULL, class label used to identify QC samples.

output

character(), a filename of the output pdf file. Can include the path. If set to NULL output will be list object containing class ggplot plots.

Value

Pdf file or list() object ggplot class showing data before and after signal correction.

Examples

1
2
3
4
5
6
7
order <- c(1:ncol(MTBLS79))
data <- MTBLS79[1:10, ]

out <- QCRSC(df =data, order=order, batch=MTBLS79$Batch, 
   classes=MTBLS79$Class, spar=0, minQC=4)
plots <- sbc_plot (df=data, corrected_df=out, classes=MTBLS79$Class,
   batch=MTBLS79$Batch, output=NULL) 

pmp documentation built on April 1, 2021, 6:01 p.m.