sw.perm.test: Permutation Test for Smith-Waterman Algorithm

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

View source: R/cgh.R

Description

Perform a permutation test of island scores from the Smith-Waterman algorithm.

Usage

1
2
  sw.perm.test(x, max.nIslands = 1, nIter = 1000, seed = NULL, trace = FALSE)
  

Arguments

x

a vector of real values

max.nIslands

number of iterations of the algorithm, each iteration finding the next highest-scoring 'island' of positive values, or NULL to find all islands

nIter

number of permutations of the input data used in the test

seed

seed for the random number generator, or NULL to use a faster random number generator that cannot be seeded

trace

print verbose output if TRUE

Value

A vector of probability values, calculated as the proportion of instances for which performing the Smith-Waterman algorithm on random permutations of the data identifies a higher-scoring island than the islands identified when the algorithm is performed on the original data

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
11
12
13
## 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)

## perform Smith-Waterman
sw(x)

## perform permutation test on the islands identified
sw.perm.test(x, max.nIslands = NULL, nIter= 1e4)
  

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

Related to sw.perm.test in cgh...