sw.threshold(cgh)R Documentation

Threshold function

Description

Function to adjust intensity logratios for sign and threshold before performing the Smith-Waterman Algorithm.

Usage

  sw.threshold(logratio,
      threshold.func = function(x) median(x) + .2 * mad(x), sign = +1)
  

Arguments

logratio a vector of real values, corresponding to fluorescence intensity logratios
threshold.func function for calculating threshold
sign sign of logratio adjustment

Details

The purpose of this function is to adjust the microarray fluorescence intensity logratios to ensure that they have the appropriate sign and a mean that is less than zero. sign = +1 is used to detect polysomy (regions of copy number change increase) in test:control logratios. Conversely, sign = -1 is used – inverting the sign of the logratios – to detect deletions (regions of copy number decrease). A threshold, calculated using the threshold function, is subtracted from the sign-adjusted logratios to ensure that they have a negative mean. The default threshold function is equal to the median, plus a small contant multiplied by a robust estimator of the standard deviation.

Value

A numeric vector equal to
sign * logratio - threshold.func( sign * logratio )

Author(s)

T.S.Price

See Also

sw

Examples

## simluate vector of logratios
set.seed(3)
logratio <- c(rnorm(20) - 1, rnorm(20))

## invert sign of values and subtract threshold to ensure negative mean
x <- sw.threshold(logratio, function(x) median(x) + .2 * mad(x), sign = -1)

## perform Smith-Waterman algorithm
sw(x, trace = TRUE)
  

[Package Contents]