ap_norm2: Full AP data transformation

View source: R/data_transformation_2_diff_input.R

ap_norm2R Documentation

Full AP data transformation

Description

Wrapper function for full Autoimmunity Profiling data transformations.

Usage

ap_norm2(
  x,
  MADlimits = seq(0, 70, 5),
  na.rm = TRUE,
  check.names = FALSE,
  mad_center_prob = 0.5,
  mad_constant = 1,
  mad_low = FALSE,
  mad_high = FALSE,
  score_rightmost.closed = FALSE,
  score_left.open = FALSE,
  score_all.inside = FALSE,
  coselect_slope_cutoff = -0.5,
  coselect_offset = 0.1,
  coselect_bw = 0.1
)

Arguments

x

List with at least three elements, see Details for naming and content.

MADlimits

vector of MADs values used as boundaries for binning (≥MADs).

na.rm

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

check.names

logical, altered default from data.frame().

mad_center_prob

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

mad_constant

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

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()).

mad_high

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

score_rightmost.closed, score_left.open, score_all.inside

logical, see findInterval() for details. Defaults result in scores for MADS ≥ cutoff, and any value below the lowest cutoff gets score 0.

coselect_slope_cutoff

Arbitrary slope cutoff value. Can be chosen freely.

coselect_offset

Offset used to prevent script from finding the peak (as slope = 0 there).

coselect_bw

Bandwidth for density funciton, default set to 0.1.

Details

Arguments starting with mad_ are specific for ap_mads2(), score_ for ap_scoring2(), and coselect_ for ap_cutoff_selection2(). These arguments are seldom altered.

The x list needs to include at least the elements:

MFI = assay mfi,

BEADS = Beads info (Filtered column with information about filtering),

SAMPLES = Sample info, if any should be excluded then these should be annotated in a column called "Filtered". Any samples with no text (ie. "") in such column will be included.

Value

Updated input x with the new list elements

MADS = assay MADs,

CUTOFF_KEY = Cutoff key as data.frame with cutoff values, scores and colors,

SCORE = scored data,

BINARY = list with one data.frame per cutoff,

DENS = Density output used for cutoff selection,

ANTIGEN_CUTOFFS = Calculated antigen specific cutoffs, translated into the descrete cutoff steps,

ANTIGEN_CUTOFFS_CONT = Calculated antigen specific cutoffs, continues values.


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