sw.plot: Plot Results of Smith-Waterman Algorithm

Description Usage Arguments Author(s) References See Also Examples

View source: R/cgh.R

Description

This function plots the sign-adjusted logratios by their chromosomal location. It can superimpose the location of the highest-scoring island found by the Smith-Waterman algorithm, the results of a robustness analysis, and the expected logratios based on known copy numbers in the test DNA.

Usage

1
2
3
4
5
  sw.plot(logratio, location = seq(length(logratio)),
    threshold.func = function(x) median(x) + .2 * mad(x),
    sign = -1, highest = TRUE, expected = NULL, rob = NULL, legend = TRUE,
    xlab = "Chromosomal location", ylab = "Intensity log ratio", ...)
  

Arguments

logratio

a vector of logratios, not adjusted for sign or threshold

location

a vector of chromosomal locations corresponding to the log ratios

threshold.func

threshold function: see sw.threshold

sign

sign of logratio adjustment: see sw.threshold

highest

plot location of highest-scoring island if TRUE

expected

a vector of expected copy numbers, or NULL

rob

a vector of robustness scores, or NULL

legend

plot legend if TRUE

xlab

X axis label

ylab

Y axis label

...

other arguments passed to the 'plot' function

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 sw.threshold sw.perm.test sw.rob

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
## 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 permuation test for islands identified
p <- sw.perm.test(x, max.nIslands = NULL, nIter = 1e4)

## calculate robustness scores
r <- sw.rob(x)

## plot results
sw.plot(logratio, seq(length(logratio)),
  function(x) median(x) + .2 * mad(x), sign = -1, rob = r,
  main = paste("Toy dataset, highest-scoring island p =", p[1]))
  

Example output



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

Related to sw.plot in cgh...