track-class {trackViewer}R Documentation

Class "track"

Description

An object of class "track" represents scores of a given track.

Usage

    ## S4 method for signature 'track,character,ANY'
setTrackStyleParam(ts, attr, value)
    ## S4 method for signature 'track,character,ANY'
setTrackXscaleParam(ts, attr, value) 
    ## S4 method for signature 'track,character,ANY'
setTrackYaxisParam(ts, attr, value)

Arguments

ts

An object of track.

attr

the name of slot of trackStyle object to be changed.

value

values to be assigned.

Objects from the Class

Objects can be created by calls of the form new("track", dat, dat2, type, format, style, name).

Slots

dat

Object of class GRanges the scores of a given track. It should contain score metadata.

dat2

Object of class GRanges the scores of a given track. It should contain score metadata. When dat2 and dat is paired, dat will be drawn as positive value where dat2 will be drawn as negative value (-1 * score)

type

The type of track. It could be 'data' or 'gene'.

format

The format of the input. It could be "BED", "bedGraph", "WIG", "BigWig" or "BAM"

style

Object of class trackStyle

name

unused yet

Methods

setTrackStyleParam

change the slot values of trackStyle object for an object of track

setTrackXscaleParam

change the xscale slot values for an object of track

setTrackYaxisParam

change the yaxisStyle values for an object of track

$, $<-

Get or set the slot of track

show

show the detials of track

See Also

Please try to use importScore and importBam to generate the object.

Examples

    extdata <- system.file("extdata", package="trackViewer",
                       mustWork=TRUE)
    fox2 <- importScore(file.path(extdata, "fox2.bed"), format="BED")
    setTrackStyleParam(fox2, "color", c("red","green"))
    setTrackXscaleParam(fox2, "gp", list(cex=.5))
    setTrackYaxisParam(fox2, "gp", list(col="blue"))
    fox2$dat <- GRanges(score=numeric(0))

[Package trackViewer version 1.14.1 Index]