sbcmsPlot: Plot the output from signal batch correction for the selected...

Description Usage Arguments Value Examples

View source: R/sbcmsPlot.R

Description

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

Usage

1
2
sbcmsPlot(df, corrected_df, classes, batch, indexes = NULL,
  qc_label = "QC", output = "sbcms_plots.pdf")

Arguments

df

A data frame containing the original data before correction (samples in columns, features in rows).

corrected_df

A data frame containing the corrected data, as output by QCRSC

classes

A factor or character vector of sample classes. All QC samples should be labelled 'QC'.

batch

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 vector defining whihc features from data frame to plot. If set to NULL will plot the first 100.

qc_label

Class label for QC sample.

output

Filename of the output pdf file. Can include the path. If set to NULL output will be list object containing ggplot2 plots.

Value

Pdf file or list object showing data before and after signal correction

Examples

1
2
3
4
5
6
7
8
classes <- sbcdata$class
batch <- sbcdata$batch
data <- t(sbcdata$data[, 1:20])
order <- c(1:ncol(data))
out <- QCRSC(d =data, order=order, batch=batch, classes=classes,
    spar=0, minQC=4)
plots <- sbcmsPlot (df=data, corrected_df=out, classes, batch,
    output=NULL) 

computational-metabolomics/sbcms documentation built on June 17, 2021, 12:22 a.m.