ap_mads2: MAD normalization

View source: R/data_transformation_2_diff_input.R

ap_mads2R Documentation

MAD normalization

Description

Sample based normalization to number of Median Absolute Deviations (MADs) from the median (or other quantile probability) for Autoimmunity profiling data.

Usage

ap_mads2(
  x,
  center_prob = 0.5,
  constant = 1,
  na.rm = TRUE,
  low = FALSE,
  high = FALSE,
  check.names = FALSE
)

Arguments

x

list with at least two elements, see Details for naming and content.

center_prob

value in [0,1] passed to prob in quantile(), defaults to the median.

constant

constant for mad() function, default is 1 (compared to 1.4826 in base function).

na.rm

logical, indicating whether NA values should be stripped before the computation proceeds. Altered default from quantile() and mad().

low

if TRUE, compute the ‘lo-median’, i.e., for even sample size, do not average the two middle values, but take the smaller one.(From mad()).

high

if TRUE, compute the ‘hi-median’, i.e., take the larger of the two middle values for even sample size.(From mad()).

check.names

logical, altered default from data.frame().

Details

The input values will be normalized per sample to the number of MADs from the median using the algorithm MADs = (MFI - median )/MAD, where MAD is calculated using mad(constant=1).

The x list needs to include at least the elements:

MFI = assay mfi,

BEADS = Beads info, if any should be excluded then these should be annotated in a column called "Filtered". Any beads with no text (ie. "" or NA) or "NegControl" in such column will be included in the transformation.

Value

Updated input x with the new list elements

MADS = assay MADs.

MADS_CENTER = used center probability, default 0.5 means median.


cekehe/rappp documentation built on May 17, 2022, 8:54 a.m.