S4 class for gTrack
Class gTrack
defines a subsettable object that wraps formatting information around
genomic data (GRanges, GRangesList, RleLists, UCSC formats, ffTrack) and can be displayed
in a "genome browser" style plot.
Arguments described as "formatting" are vectors. They are replicated (if necessary) to match the length of the object.
gTrack(
data = NULL,
y.field = NA,
mdata = NULL,
edges = NULL,
vars = NULL,
colormaps = NULL,
height = 10,
ygap = 2,
ylab = "",
stack.gap = 0,
cex.label = 1,
gr.cex.label = cex.label * 0.8,
gr.srt.label = 0,
col = NA,
border = NA,
angle = 15,
name = "",
gr.colorfield = NA,
y.quantile = 0.01,
y.cap = T,
lwd.border = 1,
hadj.label = 1,
vadj.label = 0.5,
smooth = NA,
round = NA,
ywid = NA,
ypad = 0,
seqinfo = NA,
circles = FALSE,
lines = FALSE,
bars = FALSE,
draw.paths = FALSE,
path.col = "black",
path.lwd = 1,
draw.var = FALSE,
triangle = !is.null(mdata),
max.ranges = 50000,
source.file.chrsub = T,
y0.bar = NA,
yaxis = !is.na(y.field),
yaxis.pretty = 5,
yaxis.cex = 1,
chr.sub = TRUE,
edgevars = NA,
gr.labelfield = NA,
grl.labelfield = NA,
grl.colorfield = NA,
grl.cexfield = NA,
xaxis.prefix = "",
xaxis.unit = 1,
xaxis.suffix = "",
xaxis.round = 3,
xaxis.cex.label = 1,
xaxis.newline = TRUE,
xaxis.chronly = FALSE,
xaxis.width = TRUE,
xaxis.interval = "auto",
xaxis.label.angle = 0,
xaxis.ticklen = 1,
xaxis.cex.tick = 1,
sep.lty = 2,
sep.lwd = 1,
sep.bg.col = "gray95",
sep.draw = TRUE,
y0 = NA,
y1 = NA,
m.sep.lwd = 1,
cmap.min = NA,
cmap.max = NA,
labels.suppress = FALSE,
labels.suppress.grl = labels.suppress,
labels.suppress.gr = labels.suppress,
bg.col = "white",
formatting = NA
)
Instance of one of the following objects: (1) GRanges (2) GRangesList (3) ffTrack or (4) character representing Bed, Wig, BigWig, or .rds GRanges file. It can also be a list of the above (if specifying multiplying tracks.
vector or scalar character referencing meta data field of GRanges or GRangesList to use for "y axis" coordinate when plotting numeric tracks, (note: for a RleList or ffTrack this field is automatically set to "score"), default is NA for non-numeric tracks
Square matrix representing values at connections between genomic elements (e.g. chr8:1,000-2,000 to chr3:5,000-6,000). The number of
rows (and thus columns) must be equal to the length of the data
element. The value of the (i,j) element of this matrix represents a value
for the intersection of data[i]
and data[j]
. Note that all connections are assumed to be symmetric, and only the upper triangle
will be read. Displays a warning
if the matrix is non-symmetric
Data frame of columns $from, $to, and optional fields $col, $lwd, and $lty, specifying edges linking data items. Also can be a list of the above if specifying multiple tracks (and must be compatible in length with data arg)
length(.Object) length named list of named vectors whose entry i maps uniques value of a data field to colors. The data.field is specified by the name of the list entry, and the unique values / colors are specified by the named vector.
vector or scalar numeric specifying height of track(s) (in relative units)
vector or scalar numeric specifying gap between tracks
vector or scalar.numeric specifying x gap between stacking non-numeric GRanges or GrangesLists items in track(s)
vector or scalar numeric specifying the expansion factor of the range labels (formatting)
vector or scalar numeric specifying GRanges label character expansion (default is cex.label) (formatting)
vector or scalar numeric between 0 and 180 specifying rotation of GRanges labels (formatting)
vector or scalar character specifying static color for track(s), if NA then color is specified by colormaps() property or gr.colorfield or col meta data field of GRanges / GRangesList data object
vector or scalar character specifying static border for polygons in track(s), if NA then $border is determine duing gr.colorfield / colormap or meta field $border of GRanges / GRangesList
vector of scalar numeric specifying angle of polygons that represent signed range' items (only relevant if used within chainedTracks object)
vector or scalar character specifying name of this track, which will be displayed on label to the left of the track
vector or scalar integer specifying the thickness of the polygon borders (formatting)
vector or scalar numeric specifying the horizontal adjustment of the range labels (formatting)
vector or scalar numeric specifying the vertical adjustment of the range labels (formatting)
vector or scalar numeric specifying the y-extent of individual ranges (in local plot coordinates)
vector or scalar numeric between 0 and 1 specifying how much whitespace padding to add within panel (formatting)
vector or scalar logical specifying whether to scatter plot range data (formatting)
vector or scalar logical specifying whether to line plot range data (formatting)
vector or scalar logical specifying whether to bar plot range data (formatting)
vector or scalar logical specifying whether to interpret GRangesLists as "paths" and connect them with a a set of spline curves. (formatting)
vector or scalar character specifying color of path (only applicable for tracks in which draw.paths = T) (formatting)
vector or scalar logical specifying whether to draw.var for GRanges / GRangesList specifying reads (GRanges must contain $cigar +/- $MD field) (formatting)
vector or scalar numeric specifying what is the max number of ranges to plot in a window (formatting)
vector or scalar logical specifying whether or not sub "chr" out of any external files (e.g. UCSC style files) (formatting)
vector or scalar numeric specifying where to draw the lower boundary of a bar in a bar plot (only applicable if bars == T) (formatting)
vector or scalar logical specifying whether to print yaxis (formatting)
vector or scalar positive integer specifying how many ticks to optimally draw on yaxis (formatting)
vector or scalar character specifying which GRanges meta data field to use for GRanges label (default "label") (formatting)
vector or scalar character specifying which GRanges meta data field to use for GRangesList label (default "label") (formatting)
vector or scalar character specifying which GRanges meta data field to use for GRangesList labels color (default "label.color") (formatting)
vector or scalar character specifying which GRanges meta data field to use for GRangesList labels cex (default "cex.label") (formatting)
vector or scalar numeric specifying the unit that will be used in describing x axis coordinates (TODO: move to display) (formatting)
vector or scalar numeric specifying the suffix that will be used in describin x axis coordinates (TODO: move to display) (formatting)
vector or scalar non-neg integer specifying number of decimals to round xaxis coordinate labels (formatting)
vector or scalar logical specifying whether to draw a newline in the xaxis coordinate labels (formatting)
Logical scalar specifying whether to add window width to xaxis window labels [TRUE]
vector or scalar numeric between 0 and 360 specifying angle with which to draw xaxis coordinate labels (formatting)
Scalar numeric specifying lengths for axis ticks (formatting)
Scalar numeric specifying expansion factor for axis tick labels (formatting)
Scalar integer specifying line style for window separators [2] (dashed line)
Scalar numeric specifying line thickness for window separators [1]
Color (supplied by name or hex code) for the background of the windows [gray95]
Logical allowing separators to be turned off [FALSE]
minimum saturating data value of color map for triangle plot
maximum saturating data value of color map for triangle plot
whether to suppress labels (both GRangesList and GRanges)
whether to suppress GRangesList labels
Scalar positive integer specifying what is the maximum number of items to include in legend [Inf]
vector or scalar logical flag specifying whether to suppress all GRanges / GRangesList label drawing (formatting)
vector or scalar logical flag specifying whether to suppress GRanges label drawing (formatting)
vector or scalar logical flag specifying whether to suppress GRangesList label drawing (formatting)
size of bottom level label (i.e. GRanges in a GrangesListitem, e.g. exons in a gene)
vector or scalar logical flag specifying whether to split when lifting (only relevant if used wihtin chainedTracks object)
vector or scalar positive integer specifying how many xaxis ticks to optimally draw (formatting)
vector or scalar character specifying color of "gridlines" used to specify numeric track data (formatting)
vector or scalar non-neg numeric specifying character expansion for y tick / y grid labels (formatting)
vector or scalar positive integer specifying line style of y grid lines for numeric tracks (formatting)
vector or scalar positive integer specifying thickness of y grid lines for numeric tracks (formatting)
vector or scalar positive integer specifying fraction of xlim left of plot to place y axis labels (formatting)
vector or scalar character specifying color of arrow of path (only applicable for tracks in which draw.paths = T) (formatting)
vector or scalar numeric > 0 specifying expansion factor of arrow of path (only applicable for tracks in which draw.paths = T) (formatting)
vector or scalar numeric > 0 specifying y stack gap of paths (only applicable for tracks in which draw.paths = T) (formatting)
vector or scalar numeric > 0 specifying x stack gap for paths (only applicable for tracks in which draw.paths = T) (formatting)
vector or scalar numeric > 0 specifying vertical bulge of sline in paths (only applicable for tracks in which draw.paths = T) (formatting)
vector or scalar numeric > 0 specifying horizontal bulge of spline in paths (formatting) (only applicable for tracks in which draw.paths = T) (formatting)
vector or scalar logical specifying whether to draw "backbone" connecting different items in a GRangesList item (formatting)
additional formatting arguments to gTrack
length(.Object) length list containing genomic data (e.g. GRanges, GrangesLists, RleLists, path to ucsc file or ffTrack file on disk)
Seqinfo object
length(.Object) length named list of named vectors whose entry i specifies the colormap for the meta data field of object entry i (specified by the name) and maps unique value of that data field to colors (specified by the named vector)
list of data.frames of length length(.Object) which has columns $from, $to, and optional fields $col, $lwd, and $lty to specify splined edges joining data items in the corresponding track
data.frame
holding all of the formatting options
matrix
holding interaction data between genomic loci (e.g. hiC)
List of variants associated with track