SpTrellis-class: Class "SpTrellis"

SpTrellis-classR Documentation

Class "SpTrellis"

Description

A reference class to manage the trellis graphics related component of the Snapshot functionality for visualization of genomic data.

Usage

SpTrellis(trellis, debug_enabled=FALSE)

Arguments

trellis

A trellis object for storing the plot of the genome area being visualized.

debug_enabled

logical(1) indicating whether class methods should report debugging information to the user.

Fields

trellis:

Object of class trellis for storing the plot information.

debug_enabled

logical(1) indicating whether class methods should report debugging information to the user.

Methods

zi

signature(x="SpTrellis"): zoom in

zo

signature(x="SpTrellis"): zoom out

right

signature(x="SpTrellis"): shift to the right

left

signature(x="SpTrellis"): shift to the left

restore

signature(x="SpTrellis"): restore to the original plot

show

signature(x="SpTrellis"): show the current plot

update

signature(x="SpTrellis"): update the trellis parameters of the SpTrellis object.

Author(s)

Chao-Jen cwon2@fhcrc.org

See Also

Snapshot

Examples

col <- c("#66C2A5", "#FC8D62")
x = numeric(1000)
x[sample(1000, 100)] <- abs(rnorm(100))
df <- data.frame(x = c(x, -x), pos = seq(1, 1e5, length.out=1000),
                 group = rep(c("positive", "negative"), each=1000))
cv <- lattice::xyplot(x ~ pos, df, group=group, type="s",
    col=col, main="yeast chrI:1 - 2e5",
    ylab="Coverage", xlab="Coordinate",
    scales=list(y=list(tck=c(1,0)),
                x=list(rot=45, tck=c(1,0), tick.number=20)),
    panel=function(...) {
            lattice::panel.xyplot(...)
            lattice::panel.grid(h=-1, v=20)
            lattice::panel.abline(a=0, b=0, col="grey")
    })
s <- SpTrellis(cv)
s
zi(s)
zi(s)
left(s)
right(s)
zo(s)
restore(s)


Bioconductor/ShortRead documentation built on April 25, 2024, 2:08 a.m.