Skip to contents

This function returns a pmart object that has been undergone QCRFSC batch effect correction

Usage

bc_qcrfsc(
  omicsData,
  qc_cname,
  qc_val,
  order_cname,
  group_cname,
  ntree = 500,
  keep_qc = FALSE
)

Arguments

omicsData

an object of the class 'pepData', 'proData', 'metabData', 'lipidData', or 'nmrData', usually created by as.pepData, as.proData, as.metabData, as.lipidData, or as.nmrData, respectively.

qc_cname

character string giving name of column in omicsData$f_data that contains the factor variable indicating whether sample is QC or not

qc_val

character string giving the value from the qc_cname column that indicates a QC sample

order_cname

character string giving name of column in omicsData$f_data that contains the run order

group_cname

character string giving the name of the column in omicsData$f_data that contians the group information

ntree

number of trees to grow in random forest model (default is set to 500)

keep_qc

logical value to determine whether or not to include QC samples in the final output of the data (default is set to FALSE)

Value

Object of same class as omicsData that has been undergone QCRFSC normalization

Details

QCRFSC is ran on the raw abundance values. However, it is recommended to run imputation on the log2 scale. Therefore, when using QCRFSC, it is encouraged to transform the data to log2 scale for imputation, and then transform the data back to a raw abundance scale for bc_qcrfsc

Author

Damon Leach

Examples

library(malbacR)
library(pmartR)
data("pmart_amide")
pmart_amide <- edata_transform(pmart_amide,"log2")
impObj <- imputation(omicsData = pmart_amide)
amide_imp <- apply_imputation(imputeData = impObj, omicsData = pmart_amide)
amide_imp_abund <- edata_transform(amide_imp,"abundance")
amide_imp_abund <- group_designation(amide_imp_abund,main_effects = "group")
amide_qcrfsc <- bc_qcrfsc(omicsData = amide_imp_abund,qc_cname = "group",qc_val = "QC",order_cname = "Injection_order",group_cname = "group", ntree = 500,keep_qc = FALSE)