A container for other track objects from the Gviz package that allows for the addition of a common highlighting area across tracks.
# S4 method for class 'HighlightTrack'
initialize(.Object, trackList, ...)
HighlightTrack(
trackList = list(),
range = NULL,
start = NULL,
end = NULL,
width = NULL,
chromosome,
genome,
name = "HighlightTrack",
...
)
# S4 method for class 'HighlightTrack,list'
displayPars(x, recursive = FALSE) <- value
# S4 method for class 'HighlightTrack'
length(x)
# S4 method for class 'HighlightTrack'
chromosome(GdObject) <- value
# S4 method for class 'HighlightTrack'
setStacks(GdObject, ...)
# S4 method for class 'HighlightTrack'
consolidateTrack(GdObject, chromosome, ...)
# S4 method for class 'HighlightTrack'
subset(x, ...)
# S4 method for class 'HighlightTrack'
show(object).Object
A list of Gviz track objects that all have to inherit from
class GdObject.
All additional parameters are ignored.
An optional meta argument to handle the different input types. If the
range argument is missing, all the relevant information to create the
object has to be provided as individual function arguments (see below).
The different input options for range are:
GRanges object:the genomic ranges for the highlighting regions.
IRanges object:almost identical to the
GRanges case, except that the chromosome information has to be
provided in the separate chromosome argument, because it can not be
directly encoded in an IRanges object.
data.frame object:the data.frame needs to contain
at least the two mandatory columns start and end with the
range coordinates. It may also contain a chromosome column with the
chromosome information for each range. If missing, this information will be
drawn from the constructor's chromosome argument.
An integer scalar with the genomic start or end coordinates
for the highlighting range. Can also be supplied as part of the range
argument.
An integer vector of widths for highlighting ranges. This can
be used instead of either start or end to specify the range
coordinates.
The chromosome on which the track's genomic ranges are
defined. A valid UCSC chromosome identifier if
options(ucscChromosomeNames=TRUE). Please note that in this case only
syntactic checking takes place, i.e., the argument value needs to be an
integer, numeric character or a character of the form chrx, where
x may be any possible string. The user has to make sure that the
respective chromosome is indeed defined for the the track's genome. If not
provided here, the constructor will try to build the chromosome information
based on the available inputs, and as a last resort will fall back to the
value chrNA. Please note that by definition all objects in the
Gviz package can only have a single active chromosome at a time
(although internally the information for more than one chromosome may be
present), and the user has to call the chromosome<- replacement
method in order to change to a different active chromosome.
The genome on which the track's ranges are defined. Usually
this is a valid UCSC genome identifier, however this is not being formally
checked at this point. If not provided here the constructor will try to
extract this information from the provided inputs, and eventually will fall
back to the default value of NA.
Character scalar of the track's name. This is not really used and only exists fro completeness.
A valid track object class name, or the object itself, in which case the class is derived directly from it.
logical
Value to be set.
Object of GdObject-class.
object
The return value of the constructor function is a new object of class
HighlightTrack.
A track to conceptionally group other Gviz track objects into a meta track
for the sole purpose of overlaying all the contained tracks with the same
highlighting region as defined by the objects genomic ranges. During
rendering the contained tracks will be treated as if they had been provided
to the plotTracks function as individual objects.
initialize(HighlightTrack): Initialize.
HighlightTrack(): Constructor function for
HighlightTrack-class.
displayPars(x = HighlightTrack) <- value: set display parameters using the values of
the named list in value. See settings for details on display
parameters and customization.
length(HighlightTrack): return the number of subtracks.
chromosome(HighlightTrack) <- 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(HighlightTrack): Rrecompute 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(HighlightTrack): Consolidate
For a HighlightTrack apply the method on each of the subtracks in
the trackList slot
subset(HighlightTrack): subset all the contained tracks in an HighlightTrack by coordinates and sort if necessary.
show(HighlightTrack): Show method.
Objects can be created using the constructor function HighlightTrack.