| plot.ras | R Documentation |
S3 plot method for objects of class "ras" returned by
ras. When zoom = FALSE (default) produces the
full-chromosome scan profile with detected changepoints marked. When
zoom = TRUE produces the zoomed multi-panel figure around each
detected changepoint.
## S3 method for class 'ras'
plot(
x,
zoom = FALSE,
device = "pdf",
p.threshold = 8,
y_cap = NULL,
min_display_p = 1,
xlim = NULL,
zoom_half_width = 3000,
ncol = 3,
min_signal = 2.5,
...
)
x |
Object of class |
zoom |
Logical. |
device |
Character. Output device: |
p.threshold |
Numeric. Significance reference line on the
|
y_cap |
Numeric or |
min_display_p |
Numeric. Minimum |
xlim |
Numeric vector of length 2, or |
zoom_half_width |
Numeric. Half-width of each zoom panel in SNP index
units (zoom plot only). Default |
ncol |
Integer. Columns in the zoom panel grid (zoom plot only).
Default |
min_signal |
Numeric. Low-signal colour boundary on the
|
... |
Currently unused. |
Invisibly returns x. Called for its side effect of writing
plot files or rendering to the active graphics device.
ras for the function that produces the
"ras" object. print.ras for the console summary.
## Build a minimal "ras" object by hand (see ras() for the full pipeline)
set.seed(7)
xg <- seq(1, 2000, by = 10)
yg <- c(seq(0, 9, length.out = length(xg) %/% 2),
seq(9, 1, length.out = length(xg) - length(xg) %/% 2)) +
rnorm(length(xg), sd = 0.4)
detection <- list(
tau_hats = xg[100],
all.changepoints = xg[c(95, 100, 105)],
all.p.values = c(5, 12, 4),
left.slopes = 0.3,
right.slopes = -0.3
)
result <- structure(
list(scan = list(x = xg, y = yg), detection = detection,
chrom = 1, save_dir = tempdir()),
class = "ras")
plot(result, device = "screen")
plot(result, zoom = TRUE, device = "screen")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.