gvizPlot: Generate Gviz plot

gvizPlotR Documentation

Generate Gviz plot

Description

gvizPlot generates a plot around one or many given query elements with all overlapping subject hits. In addition, each generated plot can be stored in the gvizPlots folder get or set by gvizPlotsFolder. A maximum of 25 elements can be plotted per track.

Usage

gvizPlot(
  OGREDataSet,
  query,
  gvizPlotsFolder = metadata(OGREDataSet)$gvizPlotsFolder,
  trackRegionLabels = setNames(rep("ID", length(OGREDataSet)), names(OGREDataSet)),
  trackShapes = setNames(rep("fixedArrow", length(OGREDataSet)), names(OGREDataSet)),
  showPlot = FALSE,
  extendPlot = c(-300, 300),
  nElements = 25
)

Arguments

OGREDataSet

A OGREDataSet.

query

A character vector of one or many query elements ID's (i.e. Gene ID's).

gvizPlotsFolder

A character pointing to the plot(s) output directory. If not supplied a folder is automatically generated and can be accessed by metatdata(OGREDataSet)$gvizPlotsFolder.

trackRegionLabels

A labeled character vector that defines the type of label that is displayed for query and subject elements during plotting. Vector values represent the type of label and vector labels define the type of subject element. In the following example setNames(c("ID","name"),c("genes","CGI")) Value "ID" and label "genes" would annotate your genes with IDs taken from the ID column of your dataset. Datasets not defined in this vector are plotted without track labels.

trackShapes

A labeled character vector that defines the type of shape in which every dataset's elements are displayed. Vector values represent the type of shape and vector labels define the type of subject element. In the following example setNames(c("fixedArrow","box"),c("genes","CGI")) Value "fixedArrow" and label "genes" would display your genes in fixedArrow and CGI as box shape. Possible values: (box, arrow, fixedArrow, ellipse, and smallArrow) Default="fixedArrow"

showPlot

logical If FALSE(default) plots are only saved to gvizPlotsFolder. If TRUE plots are additionally send to the plotting window.

extendPlot

int vector Integer vector of length two that extends the plot window to the left or right by adding the first value to query start and the second value to query end coordinates(bp). e.g. c(-1000,1000) zooms out, c(1000,-1000) zooms in and c(-1000,0) shifts the plot window to the left.

nElements

integer Number of elements that are displayed in each track (Default=25). High n.elements can lead to overplotting. Use nElements=FALSE to display all elements.

Value

OGREDataSet.

Examples

myOGRE <- makeExampleOGREDataSet()
myOGRE <- loadAnnotations(myOGRE)
myOGRE <- fOverlaps(myOGRE)
myOGRE <- gvizPlot(myOGRE,query="ENSG00000142168")

svenbioinf/OGRE documentation built on Jan. 30, 2023, 10:55 p.m.