sw.threshold: Threshold function

Description Usage Arguments Details Value Author(s) References See Also Examples

View source: R/cgh.R

Description

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

Usage

1
2
3
  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

References

Price TS, et al. SW-ARRAY: a dynamic programming solution for the identification of copy-number changes in genomic DNA using array comparative genome hybridization data. Nucl Acids Res. 2005;33(11):3455-3464.

See Also

sw

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
## 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)
  

cgh documentation built on May 2, 2019, 5:51 a.m.

Related to sw.threshold in cgh...