rmd_filter: Robust Mahalanobis Distance (RMD) Filter Object

View source: R/filter_objects.R

rmd_filterR Documentation

Robust Mahalanobis Distance (RMD) Filter Object

Description

The method computes a robust Mahalanobis distance that can be mapped to a p-value and used to identify outlying samples

Usage

rmd_filter(omicsData, ignore_singleton_groups = TRUE, metrics = NULL)

Arguments

omicsData

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

ignore_singleton_groups

logical indicator of whether to remove singleton groups or not; defaults to TRUE. A singleton group is a group consisting of just a single sample. If TRUE, rmd_filter results are returned only for samples in groups of size greater than 1. This is used when calculating the correlation.

metrics

A character vector indicating which metrics should be used when calculating the robust Mahalanobis distance. This vector must contain between two and five of the following options: "MAD" (Median Absolute Deviation), "Kurtosis", "Skewness", "Correlation", and "Proportion_Missing". The default is NULL. When NULL a combination of metrics will be chosen depending on the class of omicsData.

Details

The metrics on which the log2 robust Mahalanobis distance is based can be specified using the metrics argument.

pepData, proData For pepData and proData objects, all five of the metrics "MAD", "Kurtosis", "Skewness", "Correlation", "Proportion_Missing" may be used (this is the default).
metabData, lipidData, nmrData The use of "Proportion_Missing" is discouraged due to the general lack of missing data in these datasets (the default behavior omits "Proportion_Missing" from the metrics).

Value

An S3 object of class 'rmdFilt' containing columns for the sample identifier, log2 robust Mahalanobis distance, p-values, and robust Mahalanobis distance

Author(s)

Lisa Bramer, Kelly Stratton

References

Matzke, M., Waters, K., Metz, T., Jacobs, J., Sims, A., Baric, R., Pounds, J., and Webb-Robertson, B.J. (2011), Improved quality control processing of peptide-centric LC-MS proteomics data. Bioinformatics. 27(20): 2866-2872.

Examples


library(pmartRdata)
mymetab <- edata_transform(omicsData = metab_object, data_scale = "log2")
mymetab <- group_designation(omicsData = mymetab, main_effects = "Phenotype")
rmd_results <- rmd_filter(omicsData = mymetab, 
                          metrics = c("MAD", "Skewness", "Correlation"))
rmd_results <- rmd_filter(omicsData = mymetab)

mypep <- edata_transform(omicsData = pep_object, data_scale = "log2")
mypep <- group_designation(omicsData = mypep, main_effects = "Phenotype")
rmd_results <- rmd_filter(omicsData = mypep)


pmartR/pmartRqc documentation built on March 4, 2024, 3:46 p.m.