sw.plot(cgh) | R Documentation |
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.
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", ...)
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 |
T.S.Price
sw
sw.threshold
sw.perm.test
sw.rob
## 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]))