sw.rob: Robustness Calculation for Smith-Waterman Algorithm

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

View source: R/cgh.R

Description

Calculate robustness scores to evaluate how sensitive to the threshold value is the localisation of the highest-scoring island identified by the Smith-Waterman algorithm

Usage

1
2
3
  sw.rob(x, lo.func = function(x) median(x),
      hi.func = function(x) median(x) + .4 * mad(x), prec = 100)
  

Arguments

x

a vector of real values

lo.func

a function for the lowest threshold value

hi.func

a function for the highest threshold value

prec

the precision of the calculation.

Details

This function performs a sensitivity analysis to determine the robustness the localisation of the highest-scoring island obtained by the Smith-Waterman algorithm to different values of the threshold. The Smith-Waterman algorithm is run repeatedly, each time using a different threshold value. The range of threshold values used is that obtained by dividing ( lo.func(x), hi.func(x) ) into ‘prec’ equal intervals. The robustness is calculated as the proportion of times that a particular chromosomal location falls within the highest-scoring island.

Value

A vector of robustness values equal in length to the input vector.

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), -1)

## calculate robustness values
sw.rob(x)
  

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

Related to sw.rob in cgh...