Last data update: 2014.03.03

R: DataTrack class and methods
DataTrack-classR Documentation

DataTrack class and methods

Description

A class to store numeric data values along genomic coordinates. Multiple samples as well as sample groupings are supported, with the restriction of equal genomic coordinates for a single observation across samples.

Usage


DataTrack(range=NULL, start=NULL, end=NULL, width=NULL, data, chromosome, strand, genome,
name="DataTrack", importFunction, stream=FALSE, ...)

Arguments

We tried to keep instantiation of DataTrack objects as flexible as possible to accomodate different use cases. For instance, one natural way to create a DataTrack is from an existing GRanges object. In other cases it might be more appropriate to build the object using individual function arguments.

range

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:

A GRanges object: essentially all the necessary information to create a DataTrack can be contained in a single GRanges object. The track's coordinates are taken from the start, end and seqnames slots, the genome information from the genome slot, and the numeric data values can be extracted from additional metadata columns columns (please note that non-numeric columns are being ignored with a warning). As a matter of fact, calling the constructor on a GRanges object without further arguments, e.g. DataTrack(range=obj) is equivalent to calling the coerce method as(obj, "DataTrack"). Alternatively, the GRanges object may only contain the coordinate information, in which case the numeric data part is expected to be present in the separate data argument, and the ranges have to match the dimensions of the data matrix. If data is not NULL, this will always take precedence over anything defined in the range argument. See below for details.

An IRanges object: this is very similar to the above case, except that the numeric data part now always has to be provided in the separate data argument. Also the chromosome information must be provided in the chromosome argument, because neither of the two can be directly encoded in an IRange object.

A 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 it will be drawn from the separate chromosome argument. All additional numeric columns will be interpreted as data columns, unless the data argument is explicitely provided.

A character scalar: in this case the value of the range argument is considered to be a file path to an annotation file on disk. A range of file types are supported by the Gviz package as identified by the file extension. See the importFunction documentation below for further details.

start, end, width

Integer vectors, giving the start and the end end coordinates for the individual track items, or their width. Two of the three need to be specified, and have to be of equal length or of length one, in which case the single value will be recycled accordingly. Otherwise, the usual R recycling rules for vectors do not apply and the function will cast an error.

data

A numeric matrix of data points with the number of columns equal to the number of coordinates in range, or a numeric vector of appropriate length that will be coerced into such a one-row matrix. Each individual row is supposed to contain data for a given sample, where the coordinates for each single observation are constant across samples. Depending on the plotting type of the data (see 'Details' and 'Display Parameters' sections), sample grouping or data aggregation may be available. Alternatively, this can be a character vector of column names that point into the element metadata of the range object for subsetting. Naturally, this is only supported when the range argument is of class GRanges.

strand

Character vector, the strand information for the individual track items. Currently this has to be unique for the whole track and doesn't really have any visible consequences, but we might decide to make DataTracks strand-specific at a later stage.

chromosome

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 construct 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.

genome

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 input, and eventually will fall back to the default value of NA.

name

Character scalar of the track's name used in the title panel when plotting.

importFunction

A user-defined function to be used to import the data from a file. This only applies when the range argument is a character string with the path to the input data file. The function needs to accept an argument file containing the file path and has to return a proper GRanges object with the data part attached as numeric metadata columns. Essentially the process is equivalent to constructing a DataTrack directly from a GRanges object in that non-numeric columns will be dropped, and further subsetting can be archived by means of the data argument. A set of default import functions is already implemented in the package for a number of different file types, and one of these defaults will be picked automatically based on the extension of the input file name. If the extension can not be mapped to any of the existing import function, an error is raised asking for a user-defined import function. Currently the following file types can be imported with the default functions: wig, bigWig/bw, bedGraph and bam.

Some file types support indexing by genomic coordinates (e.g., bigWig and bam), and it makes sense to only load the part of the file that is needed for plotting. To this end, the Gviz package defines the derived ReferenceDataTrack class, which supports streaming data from the file system. The user typically does not have to deal with this distinction but may rely on the constructor function to make the right choice as long as the default import functions are used. However, once a user-defined import function has been provided and if this function adds support for indexed files, you will have to make the constructor aware of this fact by setting the stream argument to TRUE. Please note that in this case the import function needs to accept a second mandatory argument selection which is a GRanges object containing the dimensions of the plotted genomic range. As before, the function has to return an appropriate GRanges object.

stream

A logical flag indicating that the user-provided import function can deal with indexed files and knows how to process the additional selection argument when accessing the data on disk. This causes the constructor to return a ReferenceDataTrack object which will grab the necessary data on the fly during each plotting operation.

...

Additional items which will all be interpreted as further display parameters.

Details

Depending on the setting of the type display parameter, the data can be plotted in various different forms as well as combinations thereof. Supported plotting types are:

p: simple xy-plot.

l: lines plot. In the case of multiple samples this plotting type is not overly usefull since the points in the data matrix are connected in column-wise order. Type a might be more appropriate in these situations.

b: combination of xy-plot and lines plot.

a: lines plot of the column-wise average values.

s: sort and connect data points along the x-axis

S: sort and connect data points along the y-axis

g: add grid lines. To ensure a consitant look and feel across multiple tracks, grid lines should preferentially be added by using the grid display parameter.

r: add a regression line to the plot.

h: histogram-like vertical lines centered in the middle of the coordinate ranges.

smooth: add a loess fit to the plot. The following display parameters can be used to control the loess calculation: span, degree, family, evaluation. See panel.loess for details.

histogram: plot data as a histogram, where the width of the histogram bars reflects the width of the genomic ranges in the range slot.

mountain: plot a smoothed version of the data relative to a baseline, as defined by the baseline display parameter. The following display parameters can be used to control the smoothing: span, degree, family, evaluation. See panel.loess for details. The layout of the plot can be further customized via the following display parameters: col.mountain, lwd.mountain, lty.mountain, fill.mountain.

polygon: plot data as a polygon (similar to mountain-type but without smoothing). Data are plotted relative to a baseline, as defined by the baseline display parameter. The layout of the plot can be further customized via the following display parameters: col.mountain, lwd.mountain, lty.mountain, fill.mountain.

boxplot: plot the data as box-and-whisker plots. The layout of the plot can be further customized via the following display parameters: box.ratio, box.width, varwidt, notch, notch.frac, levels.fos, stats, coef, do.out. See panel.bwplot for details.

gradient: collapse the data across samples and plot this average value as a color-coded gradient. Essenitally this is similar to the heatmap-type plot of a single sample. The layout of the plot can be further customized via the display parameters ncolor and gradient which control the number of gradient colors as well as the gradient base colors, respectively.

heatmap: plot the color-coded values for all samples in the form of a heatmap. The data for individual samples can be visually separated by setting the separator display parameter. It's value is taken as the amount of spacing in pixels in between two heatmap rows. The layout of the plot can be further customized via the display parameters ncolor and gradient which control the number of gradient colors as well as the gradient base colors, respectively.

horizon: plot continuous data by cutting the y range into segments and overplotting them with color representing the magnitude and direction of deviation. This is particularly useful when comparing multiple samples, in which case the horizon strips are stacked. See horizonplot for details. Please note that the origin and horizonscale arguments of the Lattice horizonplot function are available as display parameters horizon.origin and horizon.scale.

For some of the above plotting-types the groups display parameter can be used to indicate sample sub-groupings. Its value is supposed to be a factor vector of similar length as the number of samples. In most cases, the groups are shown in different plotting colors and data aggregation operations are done in a stratified fashion.

The window display parameter can be used to aggregate the data prior to plotting. Its value is taken as the number of equal-sized windows along the genomic coordinates of the track for which to compute average values. The special value auto can be used to automatically determine a reasonable number of windows which can be particularly useful when plotting very large genomic regions with many data points.

The aggregation parameter can be set to define the aggregation function to be used when averaging in windows or across collapsed items. It takes the form of either a function which should condense a numeric vector into a single number, or one of the predefined options as character scalars "mean", "median" or "sum" for mean, median or summation, respectively. Defaults to computing mean values for each sample. Note that the predefined options can be much faster because they are optimized to work on large numeric tables.

Value

The return value of the constructor function is a new object of class DataTrack or ReferenceDataTrack.

Objects from the class

Objects can be created using the constructor function DataTrack.

Slots

data:

Object of class "matrix", containing the data values to be plotted. Individual rows of the matrix correspond to individual samples, and the number of columns has to be identical to the feature number of the GRanges object in the range slot.

strand:

Object of class "character", the strand information for the track, in the form '+' for the Watson strand, '-' for the Crick strand or '*' for either of the two.

range:

Object of class IRanges, inherited from class RangeTrack. The genomic coordinates for the data values. The length of the object needs to be identical to the number of columns of the data matrix in the data slot.

chromosome:

Object of class "character", inherited from class RangeTrack

genome:

Object of class "character", inherited from class RangeTrack

dp:

Object of class DisplayPars, inherited from class GdObject

name:

Object of class "character", inherited from class GdObject

imageMap:

Object of class ImageMap, inherited from class GdObject

Extends

Class "NumericTrack", directly.

Class "RangeTrack", by class "NumericTrack", distance 2.

Class "GdObject", by class "NumericTrack", distance 3.

Methods

In the following code chunks, obj is considered to be an object of class DataTrack.

Exported in the name space:

[

signature(x="DataTrack"): subsetting of the object, either to a subet of coordinates, or to a subset of samples.

Additional Arguments:

i, j: subsetting indices for coordinates (i) or samples (j).

Examples:

obj[1:3,]

obj[,2:4]

values

signature(x="DataTrack"): return the raw data values of the object, i.e., the data matrix in the data slot.

Usage:

values(x)

Examples:

values(obj)

values<-

signature(x="DataTrack"): replace the data matrix in the data slot.

Usage:

values<-(x, value)

Additional Arguments:

value: replacement value.

Examples:

values(obj) <- matrix(1:10, ncol=2)

score

signature(x="DataTrack"): return processed data values of the object exactly like they would be plotted to the device (modulo any potential aggregration or collapsing), i.e., the raw data with optional transformations applied.

Usage:

score(x, from=NULL, to=NULL, sort=FALSE, transformation=TRUE)

Additional Arguments:

from, to: restrict to data within a certain coordinates range.

sort: sort the return values by coordinates. This is usually not necessary since the data should already be ordererd, however this is not formaly checked anywhere and some operations strictly depend on ordered data.

transformation: apply a data transformation in case one is defined as the transformation display parameter.

Examples:

score(obj)

score(obj, from=100, to=10000)

score(obj, sort=TRUE, transformation=FALSE)

split

signature(x="DataTrack"): split a DataTrack object by an appropriate factor vector (or another vector that can be coerced into one). The output of this operation is a list of DataTrack objects.

Usage:

split(x, f, ...)

Additional Arguments:

f: the splitting factor.

...: all further arguments are ignored.

Examples:

split(obj, c("a", "a", "b", "c", "a"))

range, ranges

signature(x="DataTrack"): return the genomic coordinates for the track as an object of class IRanges.

Usage:

range(x)

ranges(x)

Examples:

range(obj)

ranges(obj)

strand

signature(x="DataTrack"): return a vector of strand specifiers for all track items, in the form '+' for the Watson strand, '-' for the Crick strand or '*' for either of the two.

Usage:

strand(x)

Examples:

strand(obj)

strand<-

signature(x="DataTrack"): replace the strand information for the track items. The replacement value needs to be an appropriate scalar or vector of strand values.

Usage:

strand<-(x, value)

Additional Arguments:

value: replacement value.

Examples:

strand(obj) <- "+"

feature

signature(GdObject="DataTrack"): returns NULL since there is no grouping information for the ranges in a DataTrack.

Usage:

feature(GdObject)

Examples:

feature(obj)

feature<-

signature(gdObject="DataTrack", value="character"): this return the unaltered input object since there is no grouping information for the ranges in a DataTrack.

Usage:

feature<-(GdObject, value)

Additional Arguments:

value: replacement value.

Examples:

feature(obj) <- c("a", "a", "b", "c", "a")

Internal methods:

collapseTrack

signature(gdObject="DataTrack"): preprocess the track before plotting. This will collapse overlapping track items based on the available resolution and increase the width and height of all track objects to a minimum value to avoid rendering issues. See collapsing for details.

Usage:

collapseTrack(GdObject, diff=.pxResolution(coord="x"))

Additional Arguments:

diff: the minimum pixel width to display, everything below that will be inflated to a width of diff.

Examples:

Gviz:::collapseTrack(obj)

drawGD

signature(GdObject="DataTrack"): 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.

Usage:

drawGD(GdObject, minBase, maxBase, prepare=FALSE, subset=TRUE, ...)

Additional Arguments:

minBase, maxBase: the coordinate range to plot.

prepare: run method in preparation or in production mode.

subset: subset the object to the visible region or skip the potentially expensive subsetting operation.

...: all further arguments are ignored.

Examples:

Gviz:::drawGD(obj)

Gviz:::drawGD(obj, minBase=1, maxBase=100)

Gviz:::drawGD(obj, prepare=TRUE, subset=FALSE)

drawAxis

signature(GdObject="DataTrack"): add a y-axis to the title panel of a track.

Usage:

drawAxis(GdObject, from, to, ...)

Additional Arguments:

from, to: compute axis range from the data within a certain coordinates range only.

...: all further arguments are ignored.

Examples:

Gviz:::drawAxis(obj)

initialize

signature(.Object="DataTrack"): initialize the object

show

signature(object="DataTrack"): show a human-readable summary of the object

Inherited methods:

drawGrid

signature(GdObject="DataTrack"): superpose a grid on top of a track.

Usage:

drawGrid(GdObject, from, to, ...)

Additional Arguments:

from, to: integer scalars, restrict to coordinate range before computing the grid lines.

Examples:

Gviz:::drawGrid(obj)

chromosome

signature(GdObject="DataTrack"): return the currently active chromosome for which the track is defined. For consistancy with other Bioconductor packages, the isActiveSeq alias is also provided.

Usage:

chromosome(GdObject)

Examples:

chromosome(obj)

chromosome<-

signature(GdObject="DataTrack"): replace the value of the track's active chromosome. This has to be a valid UCSC chromosome identifier or an integer or character scalar that can be reasonably coerced into one, unless options(ucscChromosomeNames=FALSE). For consistancy with other Bioconductor packages, the isActiveSeq<- alias is also provided.

Usage:

chromosome<-(GdObject, value)

Additional Arguments:

value: replacement value.

Examples:

chromosome(obj) <- "chr12"

start, end, width

signature(x="DataTrack"): the start or end coordinates of the track items, or their width in genomic coordinates.

Usage:

start(x)

end(x)

width(x)

Examples:

start(obj)

end(obj)

width(obj)

start<-, end<-, width<-

signature(x="DataTrack"): replace the start or end coordinates of the track items, or their width.

Usage:

start<-(x, value)

end<-(x, value)

width<-(x, value)

Additional Arguments:

value: replacement value.

Examples:

start(obj) <- 1:10

end(obj) <- 20:30

width(obj) <- 1

position

signature(GdObject="DataTrack"): the arithmetic mean of the track item's coordionates, i.e., (end(obj)-start(obj))/2.

Usage:

position(GdObject)

Examples:

position(obj)

genome

signature(x="DataTrack"): return the track's genome.

Usage:

genome(x)

Examples:

genome(obj)

genome<-

signature(x="DataTrack"): set the track's genome. Usually this has to be a valid UCSC identifier, however this is not formally enforced here.

Usage:

genome<-(x, value)

Additional Arguments:

value: replacement value.

Examples:

genome(obj) <- "mm9"

length

signature(x="DataTrack"): return the number of items in the track.

Usage:

length(x)

Examples:

length(obj)

coerce

signature(from="DataTrack", to="data.frame"): coerce the GRanges object in the range slot into a regular data.frame.

Examples:

as(obj, "data.frame")

subset

signature(x="DataTrack"): subset a NumericTrack by coordinates and sort if necessary.

Usage:

subset(x, from, to, sort=FALSE, drop=TRUE, ...)

Additional Arguments:

from, to: the coordinates range to subset to.

sort: sort the object after subsetting. Usually not necessary.

drop: drop unused regions on the other, non-active chromosomes.w

...: additional arguments are ignored.

Examples:

subset(obj, from=10, to=20, sort=TRUE)

displayPars

signature(x="DataTrack", name="character"): list the value of the display parameter name. See settings for details on display parameters and customization.

Usage:

displayPars(x, name)

Examples:

displayPars(obj, "col")

displayPars

signature(x="DataTrack", name="missing"): list the value of all available display parameters. See settings for details on display parameters and customization.

Examples:

displayPars(obj)

getPar

signature(x="DataTrack", name="character"): alias for the displayPars method. See settings for details on display parameters and customization.

Usage:

getPar(x, name)

Examples:

getPar(obj, "col")

getPar

signature(x="DataTrack", name="missing"): alias for the displayPars method. See settings for details on display parameters and customization.

Examples:

getPar(obj)

displayPars<-

signature(x="DataTrack", value="list"): set display parameters using the values of the named list in value. See settings for details on display parameters and customization.

Usage:

displayPars<-(x, value)

Examples:

displayPars(obj) <- list(col="red", lwd=2)

setPar

signature(x="DataTrack", value="character"): set the single display parameter name to value. Note that display parameters in the DataTrack class are pass-by-reference, so no re-assignmnet to the symbol obj is necessary. See settings for details on display parameters and customization.

Usage:

setPar(x, name, value)

Additional Arguments:

name: the name of the display parameter to set.

Examples:

setPar(obj, "col", "red")

setPar

signature(x="DataTrack", value="list"): set display parameters by the values of the named list in value. Note that display parameters in the DataTrack class are pass-by-reference, so no re-assignmnet to the symbol obj is necessary. See settings for details on display parameters and customization.

Examples:

setPar(obj, list(col="red", lwd=2))

group

signature(GdObject="DataTrack"): return grouping information for the individual items in the track. Unless overwritten in one of the sub-classes, this usualy returns NULL.

Usage:

group(GdObject)

Examples:

group(obj)

names

signature(x="DataTrack"): return the value of the name slot.

Usage:

names(x)

Examples:

names(obj)

names<-

signature(x="DataTrack", value="character"): set the value of the name slot.

Usage:

names<-(x, value)

Examples:

names(obj) <- "foo"

coords

signature(ImageMap="DataTrack"): return the coordinates from the internal image map.

Usage:

coords(ImageMap)

Examples:

coords(obj)

tags

signature(x="DataTrack"): return the tags from the internal image map.

Usage:

tags(x)

Examples:

tags(obj)

Display Parameters

The following display parameters are set for objects of class DataTrack upon instantiation, unless one or more of them have already been set by one of the optional sub-class initializers, which always get precedence over these global defaults. See settings for details on setting graphical parameters for tracks.

aggregation="mean": Function or character scalar. Used to aggregate values in windows or for collapsing overlapping items. The function has to accept a numeric vector as a single input parameter and has to return a numeric scalar with the aggregated value. Alternatively, one of the predefined options mean, median sum, min, max or extreme can be supplied as a character scalar. Defaults to mean.

aggregateGroups=FALSE:Logical scalar. Aggregate the values within a sample group using the aggregation function specified in the aggregate parameter.

alpha.confint=0.3: Numeric scalar. The tranasparency for the confidence intervalls in confint-type plots.

amount=NULL: Numeric scalar. Amount of jittering in xy-type plots. See panel.xyplot for details.

baseline=NULL: Numeric scalar. Y-axis position of an optional baseline. This parameter has a special meaning for mountain-type and polygon-type plots, see the 'Details' section in DataTrack for more information.

box.legend=FALSE: Logical scalar. Draw a box around a legend.

box.ratio=1: Numeric scalar. Parameter controlling the boxplot appearance. See panel.bwplot for details.

box.width=NULL: Numeric scalar. Parameter controlling the boxplot appearance. See panel.bwplot for details.

cex=0.7: Numeric scalar. The default pixel size for plotting symbols.

cex.legend=1: Numeric scalar. The size factor for the legend text.

cex.sampleNames=NULL:Numeric scalar. The size factor for the sample names text in heatmap plots. Defaults to an automatic setting.

coef=1.5: Numeric scalar. Parameter controlling the boxplot appearance. See panel.bwplot for details.

col=c("#0080ff", "#ff00ff", "darkgreen", "#ff0000", "orange", "#00ff00", "brown"): Character or integer vector. The color used for all line and symbol elements, unless there is a more specific control defined elsewhere. Unless groups are specified, only the first color in the vector is usually regarded.

col.baseline=NULL: Character scalar. Color for the optional baseline, defaults to the setting of col.

col.confint=NA: Character vector. Border colors for the confidence intervals for confint-type plots.

col.histogram="#808080": Character scalar. Line color in histogram-type plots.

col.horizon=NA: The line color for the segments in the horizon-type plot. See horizonplot for details.

col.line=NULL: Character or integer scalar. The color used for line elements. Defaults to the setting of col.

col.mountain=NULL: Character scalar. Line color in mountain-type and polygon-type plots, defaults to the setting of col.

col.sampleNames="white":Character or integer scalar. The color used for the sample names in heatmap plots.

col.symbol=NULL: Character or integer scalar. The color used for symbol elements. Defaults to the setting of col.

collapse=FALSE: Logical scalar. Collapse overlapping ranges and aggregate the underlying data.

degree=1: Numeric scalar. Parameter controlling the loess calculation for smooth and mountain-type plots. See panel.loess for details.

do.out=TRUE: Logical scalar. Parameter controlling the boxplot appearance. See panel.bwplot for details.

evaluation=50: Numeric scalar. Parameter controlling the loess calculation for smooth and mountain-type plots. See panel.loess for details.

factor=0.5: Numeric scalar. Factor to control amount of jittering in xy-type plots. See panel.xyplot for details.

family="symmetric": Character scalar. Parameter controlling the loess calculation for smooth and mountain-type plots. See panel.loess for details.

fill.confint=NA: Character vector. Fill colors for the confidence intervals for confint-type plots.

fill.histogram="lightgray": Character scalar. Fill color in histogram-type plots, defaults to the setting of fill.

fill.horizon=c("#B41414", "#E03231", "#F7A99C", "#9FC8DC", "#468CC8", "#0165B3"): The fill colors for the segments in the horizon-type plot. this should be a vector of length six, where the first three entries are the colors for positive changes, and the latter three entries are the colors for negative changes. Defaults to a red-blue color scheme. See horizonplot for details.

fill.mountain=c("#CCFFFF", "#FFCCFF"): Character vector of length 2. Fill color in mountain-type and polygon-type plots.

gradient=c("#F7FBFF", "#DEEBF7", "#C6DBEF", "#9ECAE1", "#6BAED6", "#4292C6", "#2171B5", "#08519C", "#08306B"): Character vector. The base colors for the 'gradient' plotting type or the 'heatmap' type with a single group. When plotting heatmaps with more than one group, the 'col' parameter can be used to control the group color scheme, however the gradient will always be from white to 'col' and thus does not offer as much flexibility as this 'gradient' parameter.

showColorBar=TRUE: Boolean. Indicate the data range color mapping in the axis for 'heatmap' or 'gradient' types.

groups=NULL: Vector coercable to a factor. Optional sample grouping. See 'Details' section in DataTrack for further information.

horizon.origin=0: The baseline relative to which changes are indicated on the horizon-type plot. See horizonplot for details.

horizon.scale=NULL:The scale for each of the segments in the horizon-type plot. Defaults to 1/3 of the absolute data range. See horizonplot for details.

jitter.x=FALSE: Logical scalar. Toggle on jittering on the x axis in xy-type plots. See panel.xyplot for details.

jitter.y=FALSE: Logical scalar. Toggle off jittering on the y axis in xy-type plots. See panel.xyplot for details.

levels.fos=NULL: Numeric scalar. Parameter controlling the boxplot appearance. See panel.bwplot for details.

lty.baseline=NULL: Character or numeric scalar. Line type of the optional baseline, defaults to the setting of lty.

lty.mountain=NULL: Character or numeric scalar. Line type in mountain-type and polygon-type plots, defaults to the setting of lty.

lwd.baseline=NULL: Numeric scalar. Line width of the optional baseline, defaults to the setting of lwd.

lwd.mountain=NULL: Numeric scalar. Line width in mountain-type and polygon-type plots, defaults to the setting of lwd.

min.distance=0: Numeric scalar. The mimimum distance in pixel below which to collapse ranges.

na.rm=FALSE: Boolean controlling whether to discard all NA values when plotting or to keep empty spaces for NAs

ncolor=100: Integer scalar. The number of colors for the 'gradient' plotting type

notch=FALSE: Logical scalar. Parameter controlling the boxplot appearance. See panel.bwplot for details.

notch.frac=0.5: Numeric scalar. Parameter controlling the boxplot appearance. See panel.bwplot for details.

pch=20: Integer scalar. The type of glyph used for plotting symbols.

separator=0: Numeric scalar. Number of pixels used to separate individual samples in heatmap-type plots.

showSampleNames=FALSE:Boolean. Display the names of the individual samples in a heatmap plot.

showColorBar=TRUE: Boolean. Indicate the data range color mapping in the axis for ' heatmap or gradient types.

size=NULL: Numeric scalar. The relative size of the track. Can be overridden in the plotTracks function. By default the size will be set automatically based on the selected plotting type.

span=0.2: Numeric scalar. Parameter controlling the loess calculation for smooth and mountain-type plots. See panel.loess for details.

stackedBars=TRUE: Logical scalar. When there are several data groups, draw the histogram-type plots as stacked barplots or grouped side by side.

stats=X[[44]]: Function. Parameter controlling the boxplot appearance. See panel.bwplot for details.

transformation=NULL: Function. Applied to the data matrix prior to plotting or when calling the score method. The function should accept exactly one input argument and its return value needs to be a numeric vector which can be coerced back into a data matrix of identical dimensionality as the input data.

type="p": Character vector. The plot type, one or several in c("p","l", "b", "a", "s", "g", "r", "S", "confint", "smooth", "histogram", "mountain", "polygon", "h", "boxplot", "gradient", "heatmap", "horizon"). See 'Details' section in DataTrack for more information on the individual plotting types.

varwidth=FALSE: Logical scalar. Parameter controlling the boxplot appearance. See panel.bwplot for details.

window=NULL: Numeric or character scalar. Aggregate the rows values of the data matrix to window equally sized slices on the data range using the method defined in aggregation. If negative, apply a running window of size windowSize using the mean aggregation method. Alternatively, the special value auto causes the function to determine the optimal window size to avoid overplotting, and fixed uses fixed-size windows of size windowSize.

windowSize=NULL: Numeric scalar. The size of the running window when the value of window is negative.

ylim=NULL: Numeric vector of length 2. The range of the y-axis scale.

Additional display parameters are being inherited from the respective parent classes. Note that not all of them may have an effect on the plotting of DataTrack objects.

GdObject:

alpha=1: Numeric scalar. The transparency for all track items.

background.panel="transparent": Integer or character scalar. The background color of the content panel.

background.title="lightgray": Integer or character scalar. The background color for the title panels.

col.border.title="transparent": Integer or character scalar. The border color for the title panels.

lwd.border.title=1: Integer scalar. The border width for the title panels.

cex.axis=NULL: Numeric scalar. The expansion factor for the axis annotation. Defaults to NULL, in which case it is computed based on the available space.

cex.title=NULL: Numeric scalar. The expansion factor for the title panel. This effects the fontsize of both the title and the axis, if any. Defaults to NULL, which means that the text size is automatically adjusted to the available space.

col="#0080FF": Integer or character scalar. Default line color setting for all plotting elements, unless there is a more specific control defined elsewhere.

col.axis="white": Integer or character scalar. The font and line color for the y axis, if any.

col.frame="lightgray": Integer or character scalar. The line color used for the panel frame, if frame==TRUE

col.grid="#808080": Integer or character scalar. Default line color for grid lines, both when type=="g" in DataTracks and when display parameter grid==TRUE.

col.line=NULL: Integer or character scalar. Default colors for plot lines. Usually the same as the global col parameter.

col.symbol=NULL: Integer or character scalar. Default colors for plot symbols. Usually the same as the global col parameter.

col.title="white": Integer or character scalar. The font color for the title panels.

fill="lightgray": Integer or character scalar. Default fill color setting for all plotting elements, unless there is a more specific control defined elsewhere.

fontcolor="black": Integer or character scalar. The font color for all text.

fontface=1: Integer or character scalar. The font face for all text.

fontface.title=2: Integer or character scalar. The font face for the title panels.

fontfamily="sans": Integer or character scalar. The font family for all text.

fontfamily.title="sans": Integer or character scalar. The font family for the title panels.

fontsize=12: Numeric scalar. The font size for all text.

frame=FALSE: Boolean. Draw a frame around the track when plotting.

grid=FALSE: Boolean, switching on/off the plotting of a grid.

h=-1: Integer scalar. Parameter controlling the number of horizontal grid lines, see panel.grid for details.

lineheight=1: Numeric scalar. The font line height for all text.

lty="solid": Numeric scalar. Default line type setting for all plotting elements, unless there is a more specific control defined elsewhere.

lty.grid="solid": Integer or character scalar. Default line type for grid lines, both when type=="g" in DataTracks and when display parameter grid==TRUE.

lwd=1: Numeric scalar. Default line width setting for all plotting elements, unless there is a more specific control defined elsewhere.

lwd.grid=1: Numeric scalar. Default line width for grid lines, both when type=="g" in DataTracks and when display parameter grid==TRUE.

min.height=3: Numeric scalar. The minimum range height in pixels to display. All ranges are expanded to this size in order to avoid rendering issues. See collapsing for details.

min.width=1: Numeric scalar. The minimum range width in pixels to display. All ranges are expanded to this size in order to avoid rendering issues. See collapsing for details.

showAxis=TRUE: Boolean controlling whether to plot a y axis (only applies to track types where axes are implemented).

showTitle=TRUE: Boolean controlling whether to plot a title panel. Although this can be set individually for each track, in multi-track plots as created by plotTracks there will still be an empty placeholder in case any of the other tracks include a title. The same holds true for axes. Note that the the title panel background color could be set to transparent in order to completely hide it.

v=-1: Integer scalar. Parameter controlling the number of vertical grid lines, see panel.grid for details.

Author(s)

Florian Hahne

See Also

DataTrack

DisplayPars

GdObject

GRanges

ImageMap

IRanges

NumericTrack

RangeTrack

collapsing

grouping

panel.bwplot

panel.grid

panel.loess

panel.xyplot

plotTracks

settings

Examples


## Object construction:

## An empty object
DataTrack()

## from individual arguments
dat <- matrix(runif(400), nrow=4)
dtTrack <- DataTrack(start=seq(1,1000, len=100), width=10, data=dat,
chromosome=1, genome="mm9", name="random data")

## from GRanges
library(GenomicRanges)
gr <- GRanges(seqnames="chr1", ranges=IRanges(seq(1,1000, len=100),
width=10))
values(gr) <- t(dat)
dtTrack <- DataTrack(range=gr, genome="mm9", name="random data")

## from IRanges
dtTrack <- DataTrack(range=ranges(gr), data=dat, genome="mm9",
name="random data", chromosome=1)

## from a data.frame
df <- as.data.frame(gr)
colnames(df)[1] <- "chromosome"
dtTrack <- DataTrack(range=df,  genome="mm9", name="random data")



## Plotting
plotTracks(dtTrack)

## Track names
names(dtTrack)
names(dtTrack) <- "foo"
plotTracks(dtTrack)

## Subsetting and splitting
subTrack <- subset(dtTrack, from=100, to=300)
length(subTrack)
subTrack[1:2,]
subTrack[,1:2]
split(dtTrack, rep(1:2, each=50))

## Accessors
start(dtTrack)
end(dtTrack)
width(dtTrack)
position(dtTrack)
width(subTrack) <- width(subTrack)-5

strand(dtTrack)
strand(subTrack) <- "-"

chromosome(dtTrack)
chromosome(subTrack) <- "chrX"

genome(dtTrack)
genome(subTrack) <- "mm9"

range(dtTrack)
ranges(dtTrack)

## Data
values(dtTrack)
score(dtTrack)

## coercion
as(dtTrack, "data.frame")

Results


R version 3.3.1 (2016-06-21) -- "Bug in Your Hair"
Copyright (C) 2016 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)

R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.

R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.

Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.

> library(Gviz)
Loading required package: S4Vectors
Loading required package: stats4
Loading required package: BiocGenerics
Loading required package: parallel

Attaching package: 'BiocGenerics'

The following objects are masked from 'package:parallel':

    clusterApply, clusterApplyLB, clusterCall, clusterEvalQ,
    clusterExport, clusterMap, parApply, parCapply, parLapply,
    parLapplyLB, parRapply, parSapply, parSapplyLB

The following objects are masked from 'package:stats':

    IQR, mad, xtabs

The following objects are masked from 'package:base':

    Filter, Find, Map, Position, Reduce, anyDuplicated, append,
    as.data.frame, cbind, colnames, do.call, duplicated, eval, evalq,
    get, grep, grepl, intersect, is.unsorted, lapply, lengths, mapply,
    match, mget, order, paste, pmax, pmax.int, pmin, pmin.int, rank,
    rbind, rownames, sapply, setdiff, sort, table, tapply, union,
    unique, unsplit


Attaching package: 'S4Vectors'

The following objects are masked from 'package:base':

    colMeans, colSums, expand.grid, rowMeans, rowSums

Loading required package: IRanges
Loading required package: GenomicRanges
Loading required package: GenomeInfoDb
Loading required package: grid
> png(filename="/home/ddbj/snapshot/RGM3/R_BC/result/Gviz/DataTrack-class.Rd_%03d_medium.png", width=480, height=480)
> ### Name: DataTrack-class
> ### Title: DataTrack class and methods
> ### Aliases: DataTrack-class DataTrack [,DataTrack-method
> ###   [,DataTrack,ANY,ANY-method collapseTrack,DataTrack-method
> ###   drawAxis,DataTrack-method drawGD,DataTrack-method
> ###   initialize,DataTrack-method initialize,ReferenceDataTrack-method
> ###   score,DataTrack-method show,DataTrack-method
> ###   show,ReferenceDataTrack-method split,DataTrack,ANY-method
> ###   split,DataTrack-method values,DataTrack-method
> ###   values<-,DataTrack-method feature,DataTrack-method
> ###   feature<-,DataTrack,character-method range,DataTrack-method
> ###   strand,DataTrack-method subset,DataTrack-method
> ###   subset,ReferenceDataTrack-method strand<-,DataTrack-method
> ###   strand<-,DataTrack,ANY-method coerce,DataTrack,data.frame-method
> ###   coerce,GRanges,DataTrack-method
> ### Keywords: classes
> 
> ### ** Examples
> 
> 
> ## Object construction:
> 
> ## An empty object
> DataTrack()
DataTrack 'DataTrack'
| genome: NA
| active chromosome: chrNA
| positions: 0
| samples:0
| strand: NA 
> 
> ## from individual arguments
> dat <- matrix(runif(400), nrow=4)
> dtTrack <- DataTrack(start=seq(1,1000, len=100), width=10, data=dat,
+ chromosome=1, genome="mm9", name="random data")
> 
> ## from GRanges
> library(GenomicRanges)
> gr <- GRanges(seqnames="chr1", ranges=IRanges(seq(1,1000, len=100),
+ width=10))
> values(gr) <- t(dat)
> dtTrack <- DataTrack(range=gr, genome="mm9", name="random data")
> 
> ## from IRanges
> dtTrack <- DataTrack(range=ranges(gr), data=dat, genome="mm9",
+ name="random data", chromosome=1)
> 
> ## from a data.frame
> df <- as.data.frame(gr)
> colnames(df)[1] <- "chromosome"
> dtTrack <- DataTrack(range=df,  genome="mm9", name="random data")
> 
> ## Don't show: 
> ## For some annoying reason the postscript device does not know about
> ## the sans font
> #if(!interactive())
> #{
> font <- ps.options()$family
> displayPars(dtTrack) <- list(fontfamily=font, fontfamily.title=font)
> #}
> ## End(Don't show)
> 
> ## Plotting
> plotTracks(dtTrack)
> 
> ## Track names
> names(dtTrack)
[1] "random data"
> names(dtTrack) <- "foo"
> plotTracks(dtTrack)
> 
> ## Subsetting and splitting
> subTrack <- subset(dtTrack, from=100, to=300)
> length(subTrack)
[1] 19
> subTrack[1:2,]
DataTrack 'foo'
| genome: mm9
| active chromosome: chr1
| positions: 19
| samples:2
| strand: * 
> subTrack[,1:2]
DataTrack 'foo'
| genome: mm9
| active chromosome: chr1
| positions: 2
| samples:4
| strand: * 
> split(dtTrack, rep(1:2, each=50))
$`1`
DataTrack 'foo'
| genome: mm9
| active chromosome: chr1
| positions: 50
| samples:4
| strand: * 

$`2`
DataTrack 'foo'
| genome: mm9
| active chromosome: chr1
| positions: 50
| samples:4
| strand: * 

> 
> ## Accessors
> start(dtTrack)
  [1]    1   11   21   31   41   51   61   71   81   91  101  112  122  132  142
 [16]  152  162  172  182  192  202  212  223  233  243  253  263  273  283  293
 [31]  303  313  323  334  344  354  364  374  384  394  404  414  424  434  445
 [46]  455  465  475  485  495  505  515  525  535  545  556  566  576  586  596
 [61]  606  616  626  636  646  656  667  677  687  697  707  717  727  737  747
 [76]  757  767  778  788  798  808  818  828  838  848  858  868  878  889  899
 [91]  909  919  929  939  949  959  969  979  989 1000
> end(dtTrack)
  [1]   10   20   30   40   50   60   70   80   90  100  110  121  131  141  151
 [16]  161  171  181  191  201  211  221  232  242  252  262  272  282  292  302
 [31]  312  322  332  343  353  363  373  383  393  403  413  423  433  443  454
 [46]  464  474  484  494  504  514  524  534  544  554  565  575  585  595  605
 [61]  615  625  635  645  655  665  676  686  696  706  716  726  736  746  756
 [76]  766  776  787  797  807  817  827  837  847  857  867  877  887  898  908
 [91]  918  928  938  948  958  968  978  988  998 1009
> width(dtTrack)
  [1] 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10
 [26] 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10
 [51] 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10
 [76] 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10
> position(dtTrack)
  [1]    5.5   15.5   25.5   35.5   45.5   55.5   65.5   75.5   85.5   95.5
 [11]  105.5  116.5  126.5  136.5  146.5  156.5  166.5  176.5  186.5  196.5
 [21]  206.5  216.5  227.5  237.5  247.5  257.5  267.5  277.5  287.5  297.5
 [31]  307.5  317.5  327.5  338.5  348.5  358.5  368.5  378.5  388.5  398.5
 [41]  408.5  418.5  428.5  438.5  449.5  459.5  469.5  479.5  489.5  499.5
 [51]  509.5  519.5  529.5  539.5  549.5  560.5  570.5  580.5  590.5  600.5
 [61]  610.5  620.5  630.5  640.5  650.5  660.5  671.5  681.5  691.5  701.5
 [71]  711.5  721.5  731.5  741.5  751.5  761.5  771.5  782.5  792.5  802.5
 [81]  812.5  822.5  832.5  842.5  852.5  862.5  872.5  882.5  893.5  903.5
 [91]  913.5  923.5  933.5  943.5  953.5  963.5  973.5  983.5  993.5 1004.5
> width(subTrack) <- width(subTrack)-5
> 
> strand(dtTrack)
[1] "*"
> strand(subTrack) <- "-"
> 
> chromosome(dtTrack)
[1] "chr1"
> chromosome(subTrack) <- "chrX"
> 
> genome(dtTrack)
 chr1 
"mm9" 
> genome(subTrack) <- "mm9"
> 
> range(dtTrack)
IRanges object with 100 ranges and 0 metadata columns:
            start       end     width
        <integer> <integer> <integer>
    [1]         1        10        10
    [2]        11        20        10
    [3]        21        30        10
    [4]        31        40        10
    [5]        41        50        10
    ...       ...       ...       ...
   [96]       959       968        10
   [97]       969       978        10
   [98]       979       988        10
   [99]       989       998        10
  [100]      1000      1009        10
> ranges(dtTrack)
GRanges object with 100 ranges and 0 metadata columns:
        seqnames       ranges strand
           <Rle>    <IRanges>  <Rle>
    [1]     chr1     [ 1, 10]      *
    [2]     chr1     [11, 20]      *
    [3]     chr1     [21, 30]      *
    [4]     chr1     [31, 40]      *
    [5]     chr1     [41, 50]      *
    ...      ...          ...    ...
   [96]     chr1 [ 959,  968]      *
   [97]     chr1 [ 969,  978]      *
   [98]     chr1 [ 979,  988]      *
   [99]     chr1 [ 989,  998]      *
  [100]     chr1 [1000, 1009]      *
  -------
  seqinfo: 1 sequence from mm9 genome; no seqlengths
> 
> ## Data
> values(dtTrack)
         [,1]      [,2]      [,3]      [,4]      [,5]      [,6]      [,7]
V1 0.74276995 0.1519505 0.2709029 0.9986374 0.8693732 0.4990075 0.5547028
V2 0.19646912 0.6123435 0.4015222 0.6694496 0.3055675 0.1066013 0.9778416
V3 0.01332373 0.5223002 0.7491560 0.5534657 0.0634155 0.9459426 0.0464528
V4 0.98284430 0.4584428 0.6628675 0.9879556 0.0796940 0.2577034 0.4587175
        [,8]      [,9]     [,10]     [,11]     [,12]     [,13]      [,14]
V1 0.7114743 0.6581439 0.7276335 0.9340926 0.8294480 0.5543603 0.62198557
V2 0.3514832 0.1596912 0.1544898 0.7524983 0.9021087 0.1873141 0.40381717
V3 0.2481525 0.5447241 0.9323209 0.5627864 0.1077008 0.4396374 0.71694284
V4 0.8976218 0.9763228 0.9957223 0.0901090 0.8747555 0.1435783 0.08705333
       [,15]     [,16]     [,17]     [,18]     [,19]     [,20]     [,21]
V1 0.3511363 0.1663285 0.9103827 0.9046702 0.9676529 0.5957641 0.5812832
V2 0.7267148 0.3527607 0.5428807 0.2211070 0.2689392 0.5320513 0.4387275
V3 0.5966160 0.1651531 0.8310482 0.5355999 0.2641135 0.5881019 0.1565851
V4 0.4953044 0.5420656 0.5641638 0.1785391 0.5584541 0.8089368 0.8670165
        [,22]      [,23]      [,24]     [,25]     [,26]     [,27]     [,28]
V1 0.54306354 0.04648148 0.09353352 0.3320931 0.7367453 0.1625551 0.1022353
V2 0.61481156 0.09908888 0.57066076 0.8048369 0.4812943 0.7667806 0.5189481
V3 0.59847602 0.77759166 0.05347684 0.5455906 0.1415082 0.7336166 0.2717311
V4 0.05206296 0.96394019 0.40233115 0.9118939 0.2581057 0.9106455 0.4956183
        [,29]      [,30]     [,31]     [,32]     [,33]     [,34]     [,35]
V1 0.28082351 0.79342051 0.1645070 0.1554001 0.7132721 0.9980633 0.2547482
V2 0.01637892 0.99072959 0.5090876 0.3246607 0.1468873 0.2115748 0.6051322
V3 0.88978763 0.81956322 0.3387884 0.8411676 0.8952598 0.6999243 0.6376722
V4 0.26902174 0.08236568 0.4847694 0.1287761 0.8966513 0.0741848 0.8313509
       [,36]     [,37]     [,38]     [,39]     [,40]      [,41]     [,42]
V1 0.5127705 0.9423838 0.4896048 0.3787979 0.7678417 0.96437151 0.9431148
V2 0.8968834 0.4762801 0.6237371 0.8204926 0.1438662 0.30191498 0.7616698
V3 0.2921862 0.9568489 0.2064353 0.9911796 0.7420730 0.06726074 0.7432191
V4 0.6256924 0.4620215 0.3162040 0.5582669 0.1250947 0.82713380 0.5123524
        [,43]      [,44]     [,45]     [,46]     [,47]     [,48]     [,49]
V1 0.86740249 0.63841629 0.8879180 0.1668472 0.8654551 0.8331409 0.9463184
V2 0.55226149 0.04153956 0.6676295 0.9522546 0.2032217 0.8896182 0.2846751
V3 0.01153253 0.27151260 0.7382141 0.2384186 0.1585947 0.6426945 0.3498283
V4 0.10929116 0.39096089 0.7108820 0.7139833 0.3799482 0.9525238 0.6518779
       [,50]       [,51]      [,52]     [,53]      [,54]      [,55]     [,56]
V1 0.7230115 0.226715338 0.83934765 0.6348384 0.90709618 0.01292565 0.4175332
V2 0.6743317 0.236966064 0.23274704 0.7395881 0.98590190 0.92485066 0.5794470
V3 0.1649638 0.007249208 0.93848704 0.6431270 0.08065469 0.20047027 0.9161262
V4 0.4922774 0.853523073 0.07206744 0.5375849 0.83514982 0.80003536 0.7230935
       [,57]      [,58]     [,59]     [,60]      [,61]     [,62]      [,63]
V1 0.2361360 0.03648825 0.2304373 0.5950424 0.10205724 0.1952152 0.33494803
V2 0.8264694 0.39892637 0.9791514 0.1814129 0.32016093 0.8943460 0.78887352
V3 0.4482698 0.51055957 0.3758545 0.7338067 0.88192284 0.3552101 0.02558433
V4 0.5623129 0.23884955 0.5229701 0.1901047 0.03803791 0.2207448 0.05257251
       [,64]     [,65]     [,66]     [,67]     [,68]     [,69]     [,70]
V1 0.6291814 0.8397233 0.2168597 0.1002948 0.6486130 0.7204778 0.6574381
V2 0.1362006 0.5857403 0.5346572 0.6507608 0.6858305 0.2804781 0.1894534
V3 0.1992314 0.4304433 0.6793866 0.8768781 0.5921982 0.5282511 0.2731430
V4 0.5293591 0.1088181 0.7352075 0.6396285 0.1337946 0.5952426 0.5815409
       [,71]     [,72]     [,73]      [,74]      [,75]     [,76]     [,77]
V1 0.2888425 0.4735954 0.8417169 0.13802788 0.53677962 0.7385375 0.0571980
V2 0.7366147 0.2535241 0.1909031 0.01241755 0.02080887 0.8440766 0.6893891
V3 0.3924817 0.8483885 0.3797637 0.13223581 0.47268283 0.2870880 0.4200100
V4 0.7722327 0.9260893 0.4524352 0.36237936 0.59132185 0.9364520 0.7746623
       [,78]     [,79]       [,80]     [,81]      [,82]     [,83]     [,84]
V1 0.8398105 0.7407176 0.515407862 0.2920085 0.67646593 0.2106999 0.7270400
V2 0.6817671 0.7661646 0.316700943 0.5146764 0.90164162 0.3998001 0.6098484
V3 0.2042447 0.1464221 0.004387278 0.7583426 0.08164624 0.8329721 0.6393815
V4 0.8828030 0.8277032 0.321141220 0.3186461 0.14928950 0.7390664 0.2384015
       [,85]     [,86]      [,87]     [,88]      [,89]     [,90]     [,91]
V1 0.9175030 0.6939047 0.78940740 0.7159515 0.74008683 0.5973027 0.3371369
V2 0.8084606 0.5980947 0.77952896 0.8014990 0.51253278 0.2795279 0.4887027
V3 0.4714620 0.6912307 0.07297670 0.9816176 0.05854389 0.3393004 0.1595933
V4 0.9936197 0.3952188 0.06709371 0.9349369 0.47398864 0.2561348 0.2111153
        [,92]     [,93]     [,94]      [,95]      [,96]     [,97]     [,98]
V1 0.05821941 0.2922114 0.1691546 0.49938740 0.59578220 0.6410434 0.1155509
V2 0.64968171 0.6101075 0.1373025 0.01924456 0.83557833 0.0128218 0.1874450
V3 0.83416511 0.1294737 0.5428394 0.69577423 0.73106251 0.9043940 0.8709965
V4 0.86889948 0.5537073 0.7441084 0.66485040 0.02124602 0.1679640 0.1651570
         [,99]    [,100]
V1 0.119252527 0.1035744
V2 0.533489452 0.9918679
V3 0.001115886 0.8635132
V4 0.442873389 0.8243760
> score(dtTrack)
         [,1]      [,2]      [,3]      [,4]      [,5]      [,6]      [,7]
V1 0.74276995 0.1519505 0.2709029 0.9986374 0.8693732 0.4990075 0.5547028
V2 0.19646912 0.6123435 0.4015222 0.6694496 0.3055675 0.1066013 0.9778416
V3 0.01332373 0.5223002 0.7491560 0.5534657 0.0634155 0.9459426 0.0464528
V4 0.98284430 0.4584428 0.6628675 0.9879556 0.0796940 0.2577034 0.4587175
        [,8]      [,9]     [,10]     [,11]     [,12]     [,13]      [,14]
V1 0.7114743 0.6581439 0.7276335 0.9340926 0.8294480 0.5543603 0.62198557
V2 0.3514832 0.1596912 0.1544898 0.7524983 0.9021087 0.1873141 0.40381717
V3 0.2481525 0.5447241 0.9323209 0.5627864 0.1077008 0.4396374 0.71694284
V4 0.8976218 0.9763228 0.9957223 0.0901090 0.8747555 0.1435783 0.08705333
       [,15]     [,16]     [,17]     [,18]     [,19]     [,20]     [,21]
V1 0.3511363 0.1663285 0.9103827 0.9046702 0.9676529 0.5957641 0.5812832
V2 0.7267148 0.3527607 0.5428807 0.2211070 0.2689392 0.5320513 0.4387275
V3 0.5966160 0.1651531 0.8310482 0.5355999 0.2641135 0.5881019 0.1565851
V4 0.4953044 0.5420656 0.5641638 0.1785391 0.5584541 0.8089368 0.8670165
        [,22]      [,23]      [,24]     [,25]     [,26]     [,27]     [,28]
V1 0.54306354 0.04648148 0.09353352 0.3320931 0.7367453 0.1625551 0.1022353
V2 0.61481156 0.09908888 0.57066076 0.8048369 0.4812943 0.7667806 0.5189481
V3 0.59847602 0.77759166 0.05347684 0.5455906 0.1415082 0.7336166 0.2717311
V4 0.05206296 0.96394019 0.40233115 0.9118939 0.2581057 0.9106455 0.4956183
        [,29]      [,30]     [,31]     [,32]     [,33]     [,34]     [,35]
V1 0.28082351 0.79342051 0.1645070 0.1554001 0.7132721 0.9980633 0.2547482
V2 0.01637892 0.99072959 0.5090876 0.3246607 0.1468873 0.2115748 0.6051322
V3 0.88978763 0.81956322 0.3387884 0.8411676 0.8952598 0.6999243 0.6376722
V4 0.26902174 0.08236568 0.4847694 0.1287761 0.8966513 0.0741848 0.8313509
       [,36]     [,37]     [,38]     [,39]     [,40]      [,41]     [,42]
V1 0.5127705 0.9423838 0.4896048 0.3787979 0.7678417 0.96437151 0.9431148
V2 0.8968834 0.4762801 0.6237371 0.8204926 0.1438662 0.30191498 0.7616698
V3 0.2921862 0.9568489 0.2064353 0.9911796 0.7420730 0.06726074 0.7432191
V4 0.6256924 0.4620215 0.3162040 0.5582669 0.1250947 0.82713380 0.5123524
        [,43]      [,44]     [,45]     [,46]     [,47]     [,48]     [,49]
V1 0.86740249 0.63841629 0.8879180 0.1668472 0.8654551 0.8331409 0.9463184
V2 0.55226149 0.04153956 0.6676295 0.9522546 0.2032217 0.8896182 0.2846751
V3 0.01153253 0.27151260 0.7382141 0.2384186 0.1585947 0.6426945 0.3498283
V4 0.10929116 0.39096089 0.7108820 0.7139833 0.3799482 0.9525238 0.6518779
       [,50]       [,51]      [,52]     [,53]      [,54]      [,55]     [,56]
V1 0.7230115 0.226715338 0.83934765 0.6348384 0.90709618 0.01292565 0.4175332
V2 0.6743317 0.236966064 0.23274704 0.7395881 0.98590190 0.92485066 0.5794470
V3 0.1649638 0.007249208 0.93848704 0.6431270 0.08065469 0.20047027 0.9161262
V4 0.4922774 0.853523073 0.07206744 0.5375849 0.83514982 0.80003536 0.7230935
       [,57]      [,58]     [,59]     [,60]      [,61]     [,62]      [,63]
V1 0.2361360 0.03648825 0.2304373 0.5950424 0.10205724 0.1952152 0.33494803
V2 0.8264694 0.39892637 0.9791514 0.1814129 0.32016093 0.8943460 0.78887352
V3 0.4482698 0.51055957 0.3758545 0.7338067 0.88192284 0.3552101 0.02558433
V4 0.5623129 0.23884955 0.5229701 0.1901047 0.03803791 0.2207448 0.05257251
       [,64]     [,65]     [,66]     [,67]     [,68]     [,69]     [,70]
V1 0.6291814 0.8397233 0.2168597 0.1002948 0.6486130 0.7204778 0.6574381
V2 0.1362006 0.5857403 0.5346572 0.6507608 0.6858305 0.2804781 0.1894534
V3 0.1992314 0.4304433 0.6793866 0.8768781 0.5921982 0.5282511 0.2731430
V4 0.5293591 0.1088181 0.7352075 0.6396285 0.1337946 0.5952426 0.5815409
       [,71]     [,72]     [,73]      [,74]      [,75]     [,76]     [,77]
V1 0.2888425 0.4735954 0.8417169 0.13802788 0.53677962 0.7385375 0.0571980
V2 0.7366147 0.2535241 0.1909031 0.01241755 0.02080887 0.8440766 0.6893891
V3 0.3924817 0.8483885 0.3797637 0.13223581 0.47268283 0.2870880 0.4200100
V4 0.7722327 0.9260893 0.4524352 0.36237936 0.59132185 0.9364520 0.7746623
       [,78]     [,79]       [,80]     [,81]      [,82]     [,83]     [,84]
V1 0.8398105 0.7407176 0.515407862 0.2920085 0.67646593 0.2106999 0.7270400
V2 0.6817671 0.7661646 0.316700943 0.5146764 0.90164162 0.3998001 0.6098484
V3 0.2042447 0.1464221 0.004387278 0.7583426 0.08164624 0.8329721 0.6393815
V4 0.8828030 0.8277032 0.321141220 0.3186461 0.14928950 0.7390664 0.2384015
       [,85]     [,86]      [,87]     [,88]      [,89]     [,90]     [,91]
V1 0.9175030 0.6939047 0.78940740 0.7159515 0.74008683 0.5973027 0.3371369
V2 0.8084606 0.5980947 0.77952896 0.8014990 0.51253278 0.2795279 0.4887027
V3 0.4714620 0.6912307 0.07297670 0.9816176 0.05854389 0.3393004 0.1595933
V4 0.9936197 0.3952188 0.06709371 0.9349369 0.47398864 0.2561348 0.2111153
        [,92]     [,93]     [,94]      [,95]      [,96]     [,97]     [,98]
V1 0.05821941 0.2922114 0.1691546 0.49938740 0.59578220 0.6410434 0.1155509
V2 0.64968171 0.6101075 0.1373025 0.01924456 0.83557833 0.0128218 0.1874450
V3 0.83416511 0.1294737 0.5428394 0.69577423 0.73106251 0.9043940 0.8709965
V4 0.86889948 0.5537073 0.7441084 0.66485040 0.02124602 0.1679640 0.1651570
         [,99]    [,100]
V1 0.119252527 0.1035744
V2 0.533489452 0.9918679
V3 0.001115886 0.8635132
V4 0.442873389 0.8243760
> 
> ## coercion
> as(dtTrack, "data.frame")
    chromosome start  end width strand         V1         V2          V3
1         chr1     1   10    10      * 0.74276995 0.19646912 0.013323734
2         chr1    11   20    10      * 0.15195047 0.61234354 0.522300235
3         chr1    21   30    10      * 0.27090288 0.40152224 0.749156005
4         chr1    31   40    10      * 0.99863744 0.66944962 0.553465712
5         chr1    41   50    10      * 0.86937321 0.30556746 0.063415498
6         chr1    51   60    10      * 0.49900749 0.10660131 0.945942562
7         chr1    61   70    10      * 0.55470282 0.97784158 0.046452801
8         chr1    71   80    10      * 0.71147426 0.35148318 0.248152486
9         chr1    81   90    10      * 0.65814395 0.15969120 0.544724127
10        chr1    91  100    10      * 0.72763349 0.15448978 0.932320904
11        chr1   101  110    10      * 0.93409260 0.75249835 0.562786386
12        chr1   112  121    10      * 0.82944799 0.90210869 0.107700842
13        chr1   122  131    10      * 0.55436028 0.18731406 0.439637411
14        chr1   132  141    10      * 0.62198557 0.40381717 0.716942843
15        chr1   142  151    10      * 0.35113627 0.72671481 0.596615992
16        chr1   152  161    10      * 0.16632850 0.35276074 0.165153066
17        chr1   162  171    10      * 0.91038274 0.54288070 0.831048177
18        chr1   172  181    10      * 0.90467017 0.22110697 0.535599899
19        chr1   182  191    10      * 0.96765289 0.26893922 0.264113522
20        chr1   192  201    10      * 0.59576411 0.53205132 0.588101874
21        chr1   202  211    10      * 0.58128320 0.43872749 0.156585131
22        chr1   212  221    10      * 0.54306354 0.61481156 0.598476023
23        chr1   223  232    10      * 0.04648148 0.09908888 0.777591664
24        chr1   233  242    10      * 0.09353352 0.57066076 0.053476842
25        chr1   243  252    10      * 0.33209309 0.80483692 0.545590601
26        chr1   253  262    10      * 0.73674532 0.48129429 0.141508243
27        chr1   263  272    10      * 0.16255512 0.76678060 0.733616621
28        chr1   273  282    10      * 0.10223533 0.51894810 0.271731135
29        chr1   283  292    10      * 0.28082351 0.01637892 0.889787631
30        chr1   293  302    10      * 0.79342051 0.99072959 0.819563219
31        chr1   303  312    10      * 0.16450697 0.50908760 0.338788426
32        chr1   313  322    10      * 0.15540006 0.32466074 0.841167562
33        chr1   323  332    10      * 0.71327214 0.14688733 0.895259791
34        chr1   334  343    10      * 0.99806327 0.21157483 0.699924332
35        chr1   344  353    10      * 0.25474823 0.60513223 0.637672214
36        chr1   354  363    10      * 0.51277052 0.89688342 0.292186209
37        chr1   364  373    10      * 0.94238375 0.47628007 0.956848877
38        chr1   374  383    10      * 0.48960478 0.62373714 0.206435341
39        chr1   384  393    10      * 0.37879793 0.82049259 0.991179575
40        chr1   394  403    10      * 0.76784170 0.14386618 0.742073050
41        chr1   404  413    10      * 0.96437151 0.30191498 0.067260743
42        chr1   414  423    10      * 0.94311482 0.76166984 0.743219054
43        chr1   424  433    10      * 0.86740249 0.55226149 0.011532535
44        chr1   434  443    10      * 0.63841629 0.04153956 0.271512598
45        chr1   445  454    10      * 0.88791804 0.66762946 0.738214080
46        chr1   455  464    10      * 0.16684716 0.95225464 0.238418630
47        chr1   465  474    10      * 0.86545512 0.20322173 0.158594680
48        chr1   475  484    10      * 0.83314094 0.88961824 0.642694454
49        chr1   485  494    10      * 0.94631836 0.28467511 0.349828342
50        chr1   495  504    10      * 0.72301152 0.67433170 0.164963822
51        chr1   505  514    10      * 0.22671534 0.23696606 0.007249208
52        chr1   515  524    10      * 0.83934765 0.23274704 0.938487036
53        chr1   525  534    10      * 0.63483836 0.73958814 0.643127039
54        chr1   535  544    10      * 0.90709618 0.98590190 0.080654686
55        chr1   545  554    10      * 0.01292565 0.92485066 0.200470271
56        chr1   556  565    10      * 0.41753322 0.57944704 0.916126181
57        chr1   566  575    10      * 0.23613600 0.82646938 0.448269759
58        chr1   576  585    10      * 0.03648825 0.39892637 0.510559568
59        chr1   586  595    10      * 0.23043731 0.97915137 0.375854467
60        chr1   596  605    10      * 0.59504239 0.18141286 0.733806743
61        chr1   606  615    10      * 0.10205724 0.32016093 0.881922839
62        chr1   616  625    10      * 0.19521518 0.89434602 0.355210055
63        chr1   626  635    10      * 0.33494803 0.78887352 0.025584329
64        chr1   636  645    10      * 0.62918137 0.13620060 0.199231426
65        chr1   646  655    10      * 0.83972329 0.58574028 0.430443346
66        chr1   656  665    10      * 0.21685974 0.53465722 0.679386624
67        chr1   667  676    10      * 0.10029480 0.65076081 0.876878148
68        chr1   677  686    10      * 0.64861298 0.68583047 0.592198203
69        chr1   687  696    10      * 0.72047780 0.28047811 0.528251074
70        chr1   697  706    10      * 0.65743812 0.18945340 0.273143003
71        chr1   707  716    10      * 0.28884249 0.73661469 0.392481674
72        chr1   717  726    10      * 0.47359544 0.25352413 0.848388459
73        chr1   727  736    10      * 0.84171695 0.19090314 0.379763745
74        chr1   737  746    10      * 0.13802788 0.01241755 0.132235810
75        chr1   747  756    10      * 0.53677962 0.02080887 0.472682826
76        chr1   757  766    10      * 0.73853745 0.84407659 0.287087999
77        chr1   767  776    10      * 0.05719800 0.68938910 0.420010044
78        chr1   778  787    10      * 0.83981052 0.68176710 0.204244672
79        chr1   788  797    10      * 0.74071757 0.76616462 0.146422150
80        chr1   798  807    10      * 0.51540786 0.31670094 0.004387278
81        chr1   808  817    10      * 0.29200854 0.51467637 0.758342618
82        chr1   818  827    10      * 0.67646593 0.90164162 0.081646238
83        chr1   828  837    10      * 0.21069991 0.39980010 0.832972132
84        chr1   838  847    10      * 0.72703998 0.60984839 0.639381474
85        chr1   848  857    10      * 0.91750301 0.80846063 0.471461965
86        chr1   858  867    10      * 0.69390468 0.59809470 0.691230692
87        chr1   868  877    10      * 0.78940740 0.77952896 0.072976704
88        chr1   878  887    10      * 0.71595152 0.80149897 0.981617649
89        chr1   889  898    10      * 0.74008683 0.51253278 0.058543889
90        chr1   899  908    10      * 0.59730269 0.27952787 0.339300411
91        chr1   909  918    10      * 0.33713687 0.48870267 0.159593281
92        chr1   919  928    10      * 0.05821941 0.64968171 0.834165114
93        chr1   929  938    10      * 0.29221141 0.61010751 0.129473659
94        chr1   939  948    10      * 0.16915463 0.13730248 0.542839355
95        chr1   949  958    10      * 0.49938740 0.01924456 0.695774227
96        chr1   959  968    10      * 0.59578220 0.83557833 0.731062509
97        chr1   969  978    10      * 0.64104342 0.01282180 0.904394020
98        chr1   979  988    10      * 0.11555091 0.18744505 0.870996497
99        chr1   989  998    10      * 0.11925253 0.53348945 0.001115886
100       chr1  1000 1009    10      * 0.10357437 0.99186787 0.863513239
            V4
1   0.98284430
2   0.45844278
3   0.66286750
4   0.98795564
5   0.07969400
6   0.25770339
7   0.45871753
8   0.89762178
9   0.97632279
10  0.99572227
11  0.09010900
12  0.87475551
13  0.14357832
14  0.08705333
15  0.49530445
16  0.54206564
17  0.56416380
18  0.17853911
19  0.55845406
20  0.80893678
21  0.86701649
22  0.05206296
23  0.96394019
24  0.40233115
25  0.91189386
26  0.25810569
27  0.91064550
28  0.49561831
29  0.26902174
30  0.08236568
31  0.48476939
32  0.12877613
33  0.89665128
34  0.07418480
35  0.83135090
36  0.62569239
37  0.46202150
38  0.31620399
39  0.55826688
40  0.12509467
41  0.82713380
42  0.51235242
43  0.10929116
44  0.39096089
45  0.71088196
46  0.71398326
47  0.37994824
48  0.95252378
49  0.65187794
50  0.49227738
51  0.85352307
52  0.07206744
53  0.53758491
54  0.83514982
55  0.80003536
56  0.72309354
57  0.56231290
58  0.23884955
59  0.52297011
60  0.19010473
61  0.03803791
62  0.22074477
63  0.05257251
64  0.52935913
65  0.10881812
66  0.73520746
67  0.63962853
68  0.13379461
69  0.59524265
70  0.58154094
71  0.77223272
72  0.92608934
73  0.45243522
74  0.36237936
75  0.59132185
76  0.93645200
77  0.77466233
78  0.88280302
79  0.82770315
80  0.32114122
81  0.31864608
82  0.14928950
83  0.73906640
84  0.23840151
85  0.99361966
86  0.39521877
87  0.06709371
88  0.93493691
89  0.47398864
90  0.25613483
91  0.21111525
92  0.86889948
93  0.55370731
94  0.74410841
95  0.66485040
96  0.02124602
97  0.16796399
98  0.16515697
99  0.44287339
100 0.82437600
> 
> 
> 
> 
> 
> 
> dev.off()
null device 
          1 
>