Skip to contents

This function returns a pmart object that has been undergone for RUV-random normalization regarding batch effect correction

Usage

bc_ruvRandom(omicsData, nc_cname, nc_val, k = 3)

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.

nc_cname

character string giving the name of the column in omicsData$e_meta that contains the factor variable indicating whether the sample is a negative control or not

nc_val

value giving the name/value in the nc_cname column that indicates that the molecule is a negative control or not

k

number of factors of unwanted variation, the default is 3, if the only factor of unwanted variation is the batch effect, we recommend setting k to be the number of batches in the data if visual inspection is not an option

Value

Object of same class as omicsData that has been undergone RUV-random normalization

Author

Damon Leach

Examples

library(malbacR)
library(pmartR)
data("pmart_mix")
pmart_mix <- edata_transform(pmart_mix,"log2")
pmart_mix <- group_designation(pmart_mix,main_effects = "BatchNum",batch_id = "BatchNum")
mix_ruv <- bc_ruvRandom(omicsData = pmart_mix, nc_cname = "tag",nc_val = "IS", k = 3)
#> Joining with `by = join_by(Metabolite)`
#> Warning: Using one column matrices in `filter()` was deprecated in dplyr 1.1.0.
#>  Please use one dimensional logical vectors instead.
#>  The deprecated feature was likely used in the malbacR package.
#>   Please report the issue to the authors.