OverlayTrack-class: OverlayTrack class and methods

OverlayTrack-classR Documentation

OverlayTrack class and methods

Description

A container for other track objects from the Gviz package that allows for overlays of their content on the same region of the plot.

Usage

## S4 method for signature 'OverlayTrack'
initialize(.Object, trackList, ...)

OverlayTrack(trackList = list(), name = "OverlayTrack", ...)

## S4 replacement method for signature 'OverlayTrack,list'
displayPars(x, recursive = FALSE) <- value

## S4 method for signature 'OverlayTrack'
length(x)

## S4 method for signature 'OverlayTrack'
chromosome(GdObject)

## S4 replacement method for signature 'OverlayTrack'
chromosome(GdObject) <- value

## S4 method for signature 'OverlayTrack'
setStacks(GdObject, ...)

## S4 method for signature 'OverlayTrack'
consolidateTrack(GdObject, chromosome, ...)

## S4 method for signature 'OverlayTrack'
subset(x, ...)

## S4 method for signature 'OverlayTrack'
drawGD(GdObject, ...)

## S4 method for signature 'OverlayTrack'
show(object)

Arguments

trackList

A list of Gviz track objects that all have to inherit from class GdObject.

...

All additional parameters are ignored.

name

Character scalar of the track's name. This is not really used and only exists fro completeness.

Details

A track to conceptionally group other Gviz track objects into a meta track in order to merge them into a single overlay visualization. Only the first track in the supplied list will be inferred when setting up the track title and axis, for all the other tracks only the panel content is plotted.

Value

The return value of the constructor function is a new object of class OverlayTrack.

Functions

  • initialize(OverlayTrack): Initialize.

  • OverlayTrack(): Constructor function for OverlayTrack-class.

  • displayPars(x = OverlayTrack) <- value: set display parameters using the values of the named list in value. See settings for details on display parameters and customization.

  • length(OverlayTrack): return the number of subtracks.

  • chromosome(OverlayTrack): return the chromosome for which the track is defined.

  • chromosome(OverlayTrack) <- value: replace the value of the track's chromosome. This has to be a valid UCSC chromosome identifier or an integer or character scalar that can be reasonably coerced into one.

  • setStacks(OverlayTrack): recompute the stacks based on the available space and on the object's track items and stacking settings. This really just calls the setStacks methods for the contained tracks and only exists for dispatching reasons.

  • consolidateTrack(OverlayTrack): #' For a OverlayTrack apply the method on each of the subtracks in the trackList slot

  • subset(OverlayTrack): plot subset all the contained tracks in an OverlayTrack by coordinates and sort if necessary.

  • drawGD(OverlayTrack): plot the object to a graphics device. The return value of this method is the input object, potentially updated during the plotting operation. Internally, there are two modes in which the method can be called. Either in 'prepare' mode, in which case no plotting is done but the object is preprocessed based on the available space, or in 'plotting' mode, in which case the actual graphical output is created. Since subsetting of the object can be potentially costly, this can be switched off in case subsetting has already been performed before or is not necessary.

  • show(OverlayTrack): Show method.

Objects from the Class

Objects can be created using the constructor function OverlayTrack.

Author(s)

Florian Hahne

See Also

DisplayPars

GdObject

GRanges

HighlightTrack

ImageMap

IRanges

RangeTrack

DataTrack

collapsing

grouping

panel.grid

plotTracks

settings

Examples



## Object construction:
set.seed(123)
dat <- runif(100, min = -2, max = 22)
dt1 <- DataTrack(data = dat, start = sort(sample(200, 100)), width = 1, genome = "hg19")
dt2 <- DataTrack(data = dat, start = sort(sample(200, 100)), width = 1, genome = "hg19")
ot <- OverlayTrack(trackList = list(dt1, dt2))

ivanek/Gviz documentation built on Nov. 20, 2023, 8:16 p.m.