BiomartGeneRegionTrack-class {Gviz} | R Documentation

## BiomartGeneRegionTrack class and methods

### Description

A class to hold gene model data for a genomic region fetched dynamically from EBI's Biomart Ensembl data source.

### Usage

    BiomartGeneRegionTrack(start, end, biomart, chromosome, strand, genome,
      stacking="squish", filters=list(), featureMap=NULL,
      name="BiomartGeneRegionTrack", symbol=NULL, gene=NULL, entrez=NULL,
      transcript=NULL, ...)

### Arguments

`start` | An integer scalar with the genomic start coordinates for the gene model range.
`end` | An integer scalar with the genomic end coordinates for the gene model range.
`biomart` | An optional `Mart` object providing access to the EBI Biomart webservice. As default the appropriate Ensembl data source is selected based on the provided genome and chromosome.
`strand` | Character scalar, the strand for which to fetch gene information from Biomart. One in `+`, `-`, or `+-`.
`chromosome` | The chromosome on which the track's genomic ranges are defined. A valid UCSC chromosome identifier. Please note that at this stage only syntactic checking takes place, i.e., the argument value needs to be a single 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.
`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 no mapping from genome to Biomart Ensembl data source is possible, the `biomart` argument needs to be provided by the user.
`stacking` | The stacking type for overlapping items of the track. One in `c(hide, dense, squish, pack,full)`. Currently, only hide (don't show the track items, squish (make best use of the available space) and dense (no stacking at all) are implemented.
`filters` | A list of additional filters to be applied in the Biomart query. See `getBM` for details.
`featureMap` | Named character vector or list to map between the fields in the Biomart data base and the features as they are used to construct the track. If multiple values are provided in a single list item, the package will use the first one that is defined in the selected Biomart.
`name` | Character scalar of the track's name used in the title panel when plotting.
`symbol,transcript,gene,entrez` | Character vector giving one or several gene symbols, Ensembl transcript identifiers, Ensembl gene identifiers, or ENTREZ gene identifiers, respectively. The genomic locus of their gene model will be fetch from Biomart instead of providing explicit start and end coordinates.
`...` | Additional items which will all be interpreted as further display parameters. See `settings` and the "Display Parameters" section below for details.

### Details

A track containing all gene models in a particular region as fetched from EBI's Biomart service. Usually the user does not have to take care of the Biomart connection, which will be established automatically based on the provided genome and chromosome information. However, for full flexibility a valid `Mart` object may be passed on to the constructor. Please note that this assumes a connection to one of the Ensembl gene data sources, mapping the available query data back to the internal object slots.

### Value

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

### Objects from the class

Objects can be created using the constructor function `BiomartGeneRegionTrack`.

### Slots

`biomart`:

  Object of class `"MartOrNULL"`, the connection to the Ensembl Biomart webservice.

`filter`:

  Object of class `"list"`, additional filters for the data base query.

`start`:

  Object of class `"numeric"`, inherited from class `GeneRegionTrack`. The start coordinates of the annotation range. The coorrdinates for the individual gene model items are stored in the `range` slot.

`end`:

  Object of class `"numeric"`, inherited from class `GeneRegionTrack`. The end coordinates of the annotation range. The corrdinates for the individual gene model items are stored in the `range` slot.

`stacking`:

  Object of class `"character"`, inherited from class `StackedTrack`

`stacks`:

  Object of class `"environment"`, inherited from class `StackedTrack`

`range`:

  Object of class `GRanges`, inherited from class `RangeTrack`

`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 `"GeneRegionTrack"`, directly.

Class `"AnnotationTrack"`, by class "GeneRegionTrack", distance 2.

Class `"StackedTrack"`, by class "GeneRegionTrack", distance 3.

Class `"RangeTrack"`, by class "GeneRegionTrack", distance 4.

Class `"GdObject"`, by class "GeneRegionTrack", distance 5.

### Methods

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

Internal methods:

initialize

  `signature(.Object = "BiomartGeneRegionTrack")`: initialize the object.

Inherited methods:

group

  `signature(gdObject="BiomartGeneRegionTrack")`: extract the group membership for all track items.

  Usage:

  `group(GdObject)`

  Examples:

    `group(obj)`

group<-

  `signature(gdObject="BiomartGeneRegionTrack", value="character")`: replace the grouping information for track items. The replacement value must be a factor of appropriate length or another vector that can be coerced into such.

  Usage:

  `group<-(GdObject, value)`

  Examples:

    `group(obj) <- c("a", "a", "b", "c", "a")`

identifier

  `signature(gdObject="BiomartGeneRegionTrack")`: return track item identifiers. Depending on the setting of the optional argument `lowest`, these are either the group identifiers or the individual item identifiers.

  Usage:

  `identifier(GdObject, lowest=FALSE)`

  Additional Arguments:

    `lowest`: return the lowest-level identifier, i.e., the item IDs, or the higher level group IDs which do not have to be unqiue.

  Examples:

    `identifier(obj, lowest=FALSE)`

identifier<-

  `signature(gdObject="BiomartGeneRegionTrack", value="character")`: Set the track item identifiers. The replacement value has to be a character vector of appropriate length. This always replaces the group-level identifiers, so essentially it is similar to `groups<-`.

  Usage:

  `identifier<-(GdObject, value)`

  Examples:

    `identifier(obj) <- c("foo", "bar")`

exon

  `signature(GdObject="BiomartGeneRegionTrack")`: Extract the exon identifiers for all exons in the gene models.

  Usage:

  `exon(GdObject)`

  Examples:

    `exon(obj)`

exon<-

  `signature(GdObject="BiomartGeneRegionTrack", value="character")`: replace the exon identifiers for all exons in the gene model. The replacement value must be a character of appropriate length or another vector that can be coerced into such.

  Usage:

  `exon<-(GdObject, value)`

  Examples:

    `exon(obj) <- paste("Exon", 1:5)`

gene

  `signature(GdObject="BiomartGeneRegionTrack")`: Extract the gene identifiers for all gene models.

  Usage:

  `gene(GdObject)`

  Examples:

    `gene(obj)`

gene<-

  `signature(GdObject="BiomartGeneRegionTrack", value="character")`: replace the gene identifiers for all gene models. The replacement value must be a character of appropriate length or another vector that can be coerced into such.

  Usage:

  `gene<-(GdObject, value)`

  Examples:

    `gene(obj) <- paste("Gene", LETTERS[1:5])`

symbol

  `signature(GdObject="BiomartGeneRegionTrack")`: Extract the human-readble gene symbol for all gene models.

  Usage:

  `symbol(GdObject)`

  Examples:

    `symbol(obj)`

symbol<-

  `signature(GdObject="BiomartGeneRegionTrack", value="character")`: replace the human-readable gene symbol for all gene models. The replacement value must be a character of appropriate length or another vector that can be coerced into such.

  Usage:

  `gene<-(GdObject, value)`

  Examples:

    `symbol(obj) <- letters[1:5]`

transcript

  `signature(GdObject="BiomartGeneRegionTrack")`: Extract the transcript identifiers for all transcripts in the gene models.

  Usage:

  `transcript(GdObject)`

  Examples:

    `transcript(obj)`

transcript<-

  `signature(GdObject="BiomartGeneRegionTrack", value="character")`: replace the transcript identifiers for all transcripts in the gene model. The replacement value must be a character of appropriate length or another vector that can be coerced into such.

  Usage:

  `transcript<-(GdObject, value)`

  Examples:

    `transcript(obj) <- paste("Exon", 1:5)`

Internal methods:

coerce

  `signature(from="BiomartGeneRegionTrack", to="UCSCData")`: coerce to a `UCSCData` object for export to the UCSC genome browser.

  Examples:

    `as(obj, "UCSCData")`

collapseTrack

  `signature(GdObject="BiomartGeneRegionTrack")`: 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)`

show

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

drawGD

  `signature(GdObject="BiomartGeneRegionTrack")`: 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)`

drawGrid

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

  Usage:

  `drawGrid(GdObject, from, to)`

  Additional Arguments:

    `from`, `to`: integer scalars, draw grid within a certain coordinates range. This needs to be supplied for the plotting function to know the current genomic coordinates.

  Examples:

    `Gviz:::drawGrid(obj, from=10, to=100)`

setStacks

  `signature(GdObject="BiomartGeneRegionTrack")`: recompute the stacks based on the available space and on the object's track items and stacking settings.

  Usage:

  `setStacks(GdObject, from, to)`

  Additional Arguments:

    `from`, `to`: integer scalars, compute stacking within a certain coordinates range. This needs to be supplied for the plotting function to know the current genomic coordinates.

  Examples:

    `Gviz:::setStacks(obj, from=1, to=100)`

stacking

  `signature(GdObject="BiomartGeneRegionTrack")`: return the current stacking type.

  Usage:

  `stacking(GdObject)`

  Examples:

    `stacking(obj)`

stacking<-

  `signature(GdObject="BiomartGeneRegionTrack", value="character")`: set the object's stacking type to one in `c(hide, dense, squish, pack,full)`.

  Usage:

  `stacking<-(GdObject, value)`

  Additional Arguments:

    `value`: replacement value.

  Examples:

    `stacking(obj) <- "squish"`

stacks

  `signature(GdObject="BiomartGeneRegionTrack")`: return the stack indices for each track item.

  Usage:

  `stacks(GdObject)`

  Examples:

    `Gviz:::stacks(obj)`

[

  `signature(x="BiomartGeneRegionTrack", i="ANY", j="ANY", drop="ANY")`: subset the items in the `BiomartGeneRegionTrack` object. This is essentially similar to subsetting of the `GRanges` object in the `range` slot. For most applications, the `subset` method may be more appropriate.

  Additional Arguments:

    `i`, `j`: subsetting indices, `j` is ignored.

    `drop`: argument is ignored.

  Examples:

    `obj[1:5]`

chromosome

  `signature(GdObject="BiomartGeneRegionTrack")`: return the chromosome for which the track is defined.

  Usage:

  `chromosome(GdObject)`

  Examples:

    `chromosome(obj)`

chromosome<-

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

  Usage:

  `chromosome<-(GdObject, value)`

  Additional Arguments:

    `value`: replacement value.

  Examples:

    `chromosome(obj) <- "chr12"`

start, end, width

  `signature(x="BiomartGeneRegionTrack")`: 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="BiomartGeneRegionTrack")`: 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="BiomartGeneRegionTrack")`: the arithmetic mean of the track item's coordionates, i.e., `(end(obj)-start(obj))/2`.

  Usage:

  `position(GdObject)`

  Examples:

    `position(obj)`

feature

  `signature(GdObject="BiomartGeneRegionTrack")`: return the grouping information for track items. For certain sub-classes, groups may be indicated by different color schemes when plotting. See `grouping` for details.

  Usage:

  `feature(GdObject)`

  Examples:

    `feature(obj)`

feature<-

  `signature(gdObject="BiomartGeneRegionTrack", value="character")`: set the grouping information for track items. This has to be a factor vector (or another type of vector that can be coerced into one) of the same length as the number of items in the `BiomartGeneRegionTrack`. See `grouping` for details.

  Usage:

  `feature<-(GdObject, value)`

  Additional Arguments:

    `value`: replacement value.

  Examples:

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

genome

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

  Usage:

  `genome(x)`

  Examples:

    `genome(obj)`

genome<-

  `signature(x="BiomartGeneRegionTrack")`: 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="BiomartGeneRegionTrack")`: return the number of items in the track.

  Usage:

  `length(x)`

  Examples:

    `length(obj)`

range

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

  Usage:

  `range(x)`

  Examples:

    `range(obj)`

ranges

  `signature(x="BiomartGeneRegionTrack")`: return the genomic coordinates for the track along with all additional annotation information as an object of class `GRanges`.

  Usage:

  `ranges(x)`

  Examples:

    `ranges(obj)`

split

  `signature(x="BiomartGeneRegionTrack")`: split a `BiomartGeneRegionTrack` object by an appropriate factor vector (or another vector that can be coerced into one). The output of this operation is a list of objects of the same class as the input object, all inheriting from class `BiomartGeneRegionTrack`.

  Usage:

  `split(x, f, ...)`

  Additional Arguments:

    `f`: the splitting factor.

    `...`: all further arguments are ignored.

  Examples:

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

strand

  `signature(x="BiomartGeneRegionTrack")`: 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="BiomartGeneRegionTrack")`: 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) <- "+"`

values

  `signature(x="BiomartGeneRegionTrack")`: return all additional annotation information except for the genomic coordinates for the track items as a data.frame.

  Usage:

  `values(x)`

  Examples:

    `values(obj)`

coerce

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

  Examples:

    `as(obj, "data.frame")`

subset

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

  Usage:

  `subset(x, from, to, sort=FALSE, ...)`

  Additional Arguments:

    `from`, `to`: the coordinates range to subset to.

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

    `...`: additional arguments are ignored.

  Examples:

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

displayPars

  `signature(x="BiomartGeneRegionTrack", 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="BiomartGeneRegionTrack", 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="BiomartGeneRegionTrack", 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="BiomartGeneRegionTrack", name="missing")`: alias for the `displayPars` method. See `settings` for details on display parameters and customization.

  Examples:

    `getPar(obj)`

displayPars<-

  `signature(x="BiomartGeneRegionTrack", 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="BiomartGeneRegionTrack", value="character")`: set the single display parameter `name` to `value`. Note that display parameters in the `BiomartGeneRegionTrack` 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="BiomartGeneRegionTrack", value="list")`: set display parameters by the values of the named list in `value`. Note that display parameters in the `BiomartGeneRegionTrack` 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))`

names

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

  Usage:

  `names(x)`

  Examples:

    `names(obj)`

names<-

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

  Usage:

  `names<-(x, value)`

  Examples:

    `names(obj) <- "foo"`

coords

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

  Usage:

  `coords(ImageMap)`

  Examples:

    `coords(obj)`

tags

  `signature(x="BiomartGeneRegionTrack")`: 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 `BiomartGeneRegionTrack` 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.

  `C_segment="burlywood4"`: Character or integer scalar. Fill color for annotation objects of type 'C_segment'.

  `D_segment="lightblue"`: Character or integer scalar. Fill color for annotation objects of type 'C_segment'.

  `J_segment="dodgerblue2"`: Character or integer scalar. Fill color for annotation objects of type 'C_segment'.

  `miRNA="cornflowerblue"`: Character or integer scalar. Fill color for annotation objects of type 'L_segment'.

  `miRNA_pseudogene="cornsilk"`: Character or integer scalar. Fill color for annotation objects of type 'miRNA_pseudogene'.

  `misc_RNA="cornsilk3"`: Character or integer scalar. Fill color for annotation objects of type 'misc_RNA'.

  `misc_RNA_pseudogene="cornsilk4"`: Character or integer scalar. Fill color for annotation objects of type 'misc_RNA_pseudogene'.

  `Mt_rRNA="yellow"`: Character or integer scalar. Fill color for annotation objects of type 'Mt_rRNA'.

  `Mt_tRNA="darkgoldenrod"`: Character or integer scalar. Fill color for annotation objects of type 'Mt_tRNA'.

  `Mt_tRNA_pseudogene="darkgoldenrod1"`: Character or integer scalar. Fill color for annotation objects of type 'Mt_tRNA_pseudogene'.

  `protein_coding="#FFD58A"`: Character or integer scalar. Fill color for annotation objects of type 'protein_coding'.

  `pseudogene="brown1"`: Character or integer scalar. Fill color for annotation objects of type 'pseudogene'.

  `retrotransposed="blueviolet"`: Character or integer scalar. Fill color for annotation objects of type 'retrotransposed'.

  `rRNA="darkolivegreen1"`: Character or integer scalar. Fill color for annotation objects of type 'rRNA'.

  `rRNA_pseudogene="darkolivegreen"`: Character or integer scalar. Fill color for annotation objects of type 'rRNA_pseudogene'.

  `scRNA="gold4"`: Character or integer scalar. Fill color for annotation objects of type 'scRNA'.

  `scRNA_pseudogene="darkorange2"`: Character or integer scalar. Fill color for annotation objects of type 'scRNA_pseudogene'.

  `snoRNA="cyan"`: Character or integer scalar. Fill color for annotation objects of type 'snoRNA'.

  `snoRNA_pseudogene="cyan2"`: Character or integer scalar. Fill color for annotation objects of type 'snoRNA_pseudogene'.

  `snRNA="coral"`: Character or integer scalar. Fill color for annotation objects of type 'snRNA'.

  `snRNA_pseudogene="coral3"`: Character or integer scalar. Fill color for annotation objects of type 'snRNA_pseudogene'.

  `tRNA_pseudogene="antiquewhite3"`: Character or integer scalar. Fill color for annotation objects of type 'tRNA_pseudogene'.

  `utr3="#FFD58A"`: Character or integer scalar. Fill color for annotation objects of type 'utr3'.

  `utr5="#FFD58A"`: Character or integer scalar. Fill color for annotation objects of type 'utr5'.

  `V_segment="aquamarine"`: Character or integer scalar. Fill color for annotation objects of type 'V_segment'.

  `verbose=FALSE`: Logical scalar. Report data loading events from Bioamart or retrieval from cache.

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 `BiomartGeneRegionTrack` objects.

  `GeneRegionTrack`:

    `arrowHeadMaxWidth=20`: Numeric scalar. The maximum width of the arrow head in pixels if `shape` is `arrow`.

    `arrowHeadWidth=10`: Numeric scalar. The width of the arrow head in pixels if `shape` is `fixedArrow`.

    `col=NULL`: Character or integer scalar. The border color for all track items. Defaults to using the same color as in `fill`, also taking into account different track `features`.

    `collapseTranscripts=FALSE`: Logical or character scalar. Can be one in `gene`, `longest`, `shortest` or `meta`. Merge all transcripts of the same gene into one single gene model. In the case of `gene` (or `TRUE`), this will only keep the start location of the first exon and the end location of the last exon from all transcripts of the gene. For `shortest` and `longest`, only the longest or shortest transcript model is retained. For `meta`, a meta-transcript containing the union of all exons is formed (essentially identical to the operation `reduce(geneModel)`).

    `exonAnnotation=NULL`: Character scalar. Add annotation information to the individual exon models. This can be a value in `symbol`, `gene`, `transcript`, `exon` or `feature`. Defaults to `exon`. Only works if `showExonId` is not `FALSE`.

    `fill="orange"`: Character or integer scalar. The fill color for untyped items. This is also used to connect grouped items. See `grouping` for details.

    `min.distance=0`: Numeric scalar. The minimum pixel distance before collapsing range items, only if `collapse==TRUE`. See `collapsing` for details. Note that a value larger than 0 may lead to UTR regions being merged to CDS regions, which in most cases is not particularly useful.

    `shape=c("smallArrow", "box")`: Character scalar. The shape in which to display the track items. Currently only `box`, `arrow`, `ellipse`, and `smallArrow` are implemented.

    `showExonId=NULL`: Logical scalar. Control whether to plot the individual exon identifiers.

    `thinBoxFeature=c("utr", "ncRNA", "utr3", "utr5", "3UTR", "5UTR", "miRNA", "lincRNA", "three_prime_UTR", "five_prime_UTR")`: Character vector. A listing of feature types that should be drawn with thin boxes. Typically those are non-coding elements.

    `transcriptAnnotation=NULL` `(Aliases: transcriptAnnotation)`: Character scalar. Add annotation information as transcript labels. This can be a value in `symbol`, `gene`, `transcript`, `exon` or `feature`. Defaults to `symbol`. Only works if `showId` is not `FALSE`.

  `AnnotationTrack`:

    `cex=1`: Numeric scalar. The font expansion factor for item identifiers.

    `cex.group=0.6`: Numeric scalar. The font expansion factor for the group-level annotation.

    `col.line="darkgray"`: Character scalar. The color used for connecting lines between grouped items. Defaults to a light gray, but if set to `NULL` the same color as for the first item in the group is used.

    `featureAnnotation=NULL`: Character scalar. Add annotation information to the individual track elements. This can be a value in `id`, `group` or `feature`. Defaults to `id`. Only works if `showFeatureId` is not `FALSE`.

    `fontcolor.group="#808080"` `(Aliases: fontcolor.group)`: Character or integer scalar. The font color for the group-level annotation.

    `fontcolor.item="white"` `(Aliases: fontcolor.item)`: Character or integer scalar. The font color for item identifiers.

    `fontface.group=2`: Numeric scalar. The font face for the group-level annotation.

    `fontfamily.group="sans"`: Character scalar. The font family for the group-level annotation.

    `fontsize.group=12`: Numeric scalar. The font size for the group-level annotation.

    `groupAnnotation=NULL`: Character scalar. Add annotation information as group labels. This can be a value in `id`, `group` or `feature`. Defaults to `group`. Only works if `showId` is not `FALSE`.

    `just.group="left"` `(Aliases: just.group)`: Character scalar. the justification of group labels. Either `left`, `right`, `above` or `below`.

    `lex=1`: Numeric scalar. The line expansion factor for all track items. This is also used to connect grouped items. See `grouping` for details.

    `lineheight=1`: Numeric scalar. The font line height for item identifiers.

    `lty="solid"`: Character or integer scalar. The line type for all track items. This is also used to connect grouped items. See `grouping` for details.

    `lwd=1`: Integer scalar. The line width for all track items. This is also used to connect grouped items. See `grouping` for details.

    `mergeGroups=FALSE`: Logical scalar. Merge fully overlapping groups if `collapse==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. For feathered bars indicating the strandedness of grouped items this also controls the height of the arrow feathers.

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

    `rotation=0`: Numeric scalar. The degree of text rotation for item identifiers.

    `rotation.group=0`: Numeric scalar. The degree of text rotation for group labels.

    `rotation.item=0`: Numeric scalar. The degree of text rotation for item identifiers.

    `showFeatureId=FALSE`: Logical scalar. Control whether to plot the individual track item identifiers.

    `showId=FALSE`: Logical scalar. Control whether to annotate individual groups.

    `showOverplotting=FALSE`: Logical scalar. Use a color gradient to show the amount of overplotting for collapsed items. This implies that `collapse==TRUE`

    `size=1`: Numeric scalar. The relative size of the track. Can be overridden in the `plotTracks` function.

  `StackedTrack`:

    `reverseStacking=FALSE`: Logical flag. Reverse the y-ordering of stacked items. I.e., features that are plotted on the bottom-most stacks will be moved to the top-most stack and vice versa.

    `stackHeight=0.75`: Numeric between 0 and 1. Controls the vertical size and spacing between stacked elements. The number defines the proportion of the total available space for the stack that is used to draw the glyphs. E.g., a value of 0.5 means that half of the available vertical drawing space (for each stacking line) is used for the glyphs, and thus one quarter of the available space each is used for spacing above and below the glyph. Defaults to 0.75.

  `GdObject`:

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

    `alpha.title=NULL`: Numeric scalar. The transparency for the title panel.

    `background.legend="transparent"`: Integer or character scalar. The background color for the legend.

    `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 panel.

    `cex.axis=NULL`: Numeric scalar. The expansion factor for the axis annotation. Defaults to `NULL`, in which case it is automatically determined 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.axis="white"`: Integer or character scalar. The font and line color for the y axis, if any.

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

    `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 `DataTrack`s and when display parameter `grid==TRUE`.

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

    `col.title="white"` `(Aliases: fontcolor.title)`: Integer or character scalar. The border color for the title panels

    `collapse=TRUE`: Boolean controlling whether to collapse the content of the track to accomodate the minimum current device resolution. See `collapsing` for details.

    `fontcolor="black"`: Integer or character scalar. The font color for all text, unless a more specific definition exists.

    `fontface=1`: Integer or character scalar. The font face for all text, unless a more specific definition exists.

    `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, unless a more specific definition exists.

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

    `fontsize=12`: Numeric scalar. The font size for all text, unless a more specific definition exists.

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

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

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

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

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

    `reverseStrand=FALSE`: Logical scalar. Set up the plotting coordinates in 3' -> 5' direction if `TRUE`. This will effectively mirror the plot on the vertical axis.

    `rotation.title=90` `(Aliases: rotation.title)`: The rotation angle for the text in the title panel. Even though this can be adjusted, the automatic resizing of the title panel will currently not work, so use at own risk.

    `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

### References

EBI Biomart webservice at http://www.biomart.org.

### See Also

`AnnotationTrack`

`DisplayPars`

`GdObject`

`GeneRegionTrack`

`GRanges`

`ImageMap`

`IRanges`

`Mart`

`RangeTrack`

`StackedTrack`

`collapsing`

`DataTrack`

`getBM`

`grouping`

`panel.grid`

`plotTracks`

`settings`

`useMart`

### Examples

    ## Construct the object
    ## Not run:
    bmTrack <- BiomartGeneRegionTrack(start=26682683, end=26711643,
    chromosome=7, genome="mm9")

    ## End(Not run)

    ## Plotting
    plotTracks(bmTrack)

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

    ## Subsetting and splitting
    subTrack <- subset(bmTrack, from=26700000, to=26705000)
    length(subTrack)
    subTrack <- bmTrack[transcript(bmTrack)=="ENSMUST00000144140"]
    split(bmTrack, transcript(bmTrack))

    ## Accessors
    start(bmTrack)
    end(bmTrack)
    width(bmTrack)
    position(bmTrack)
    width(subTrack) <- width(subTrack)+100

    strand(bmTrack)
    strand(subTrack) <- "-"

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

    genome(bmTrack)
    genome(subTrack) <- "hg19"

    range(bmTrack)
    ranges(bmTrack)

    ## Annotation
    identifier(bmTrack)
    identifier(bmTrack, "lowest")
    identifier(subTrack) <- "bar"

    feature(bmTrack)
    feature(subTrack) <- "foo"

    exon(bmTrack)
    exon(subTrack) <- letters[1:2]

    gene(bmTrack)
    gene(subTrack) <- "bar"

    symbol(bmTrack)
    symbol(subTrack) <- "foo"

    transcript(bmTrack)
    transcript(subTrack) <- c("foo", "bar")
    chromosome(subTrack) <- "chr7"
    plotTracks(subTrack)

    values(bmTrack)

    ## Grouping
    group(bmTrack)
    group(subTrack) <- "Group 1"
    transcript(subTrack)
    plotTracks(subTrack)

    ## Stacking
    stacking(bmTrack)
    stacking(bmTrack) <- "dense"
    plotTracks(bmTrack)

    ## coercion
    as(bmTrack, "data.frame")
    as(bmTrack, "UCSCData")

    ## HTML image map
    coords(bmTrack)
    tags(bmTrack)
    bmTrack <- plotTracks(bmTrack)$foo
    coords(bmTrack)
    tags(bmTrack)

[Package Gviz version 1.34.1 Index]