grToRect: Plotable rectangles from GRanges Object

Description Usage Arguments Value

Description

Given a genomicRanges Object, return the data needed to plot it as a sequence of rectangles based on widths. Gaps are all fixed at a single intronWidth. Height, fill color, and border color for the exon rectangles can be specified on a per-exon basis (vector-wrapped), or given in the genomicRanges object (as metadata colums, by default exonHeight, exonFillColor, and exonBorderColor). Returns the rectangle as a list of data, as specified below. Uses the genomicToModelCoordinates function, passing throught the parameters needed

Usage

1
2
3
4
grToRect(gr, intronWidth = 100, exonHeights = 100,
  exonFillColors = "blue", exonFillColorsCol = "exonFillColors",
  exonBorderColors = "black", exonBorderColorsCol = "exonBorderColors",
  exonHeightsCol = "exonHeights")

Arguments

gr

The GenomicRanges object to plot.

Object giving the gene to calculate the parameters for. Passed through to genomicToModelCoordinates as its gene parameter. Besides the criteria specified there, may also contain data columns 'exonHeight', 'exonFillColor' and 'exonBorderColor'. If present, the values in these columns will be used instead on the equivalently names parameters to this function.

intronWidth

The fixed spacing to use for gaps between rectangles.

The width of the itron, the x spacing between the exon rectangles. Passed through to genomicToModelCoordinates as its gapWidth parameter. Defaults to 100.

exonHeights

The vector of heights to use for the rectangles.

If fewer than the number of elements are givien, will be wrapped. If not specified exonHeightsCol must contain the column name in the GRanges object to use instead, by default it looks for column 'exonHeight'.

exonFillColors

The vector of fill colors to use for the rectangles.

If fewer than the number of elements are givien, will be wrapped. If not specified exonFillColors must contain the column name in the GRanges object to use instead, by default it looks for column 'exonFillColor'.

exonFillColorsCol

The name of GRanges column to use for exonFillColors, if not specified. By default 'exonFillColor'

exonBorderColors

The vector of border colors to use for the rectangles.

If fewer than the number of elements are givien, will be wrapped. If not specified exonBorderColors must contain the column name in the GRanges object to use instead, by default it looks for column 'exonBorderColor'.

exonBorderColorsCol

The name of GRanges column to use for exonBorderColors, if not specified. By default 'exonBorderColor'

exonHeightsCol

The name of GRanges column to use for exonHeights, if not specified. By default 'exonHeight'

Value

A list with the following elements:

xStarts

The low x coordinate; the left side of each rectangle.

xEnds

The high x coordinate; the right side of each rectangle.

yBottoms

The low y coordinate; the bottom of each rectangle.

yTops

The high y coordinate; the top of each rectangle.

fillColors

The fill color for each rectangle.

fillColors

The border color for each rectangle.

xRange

c(<min x value>, <max x value).

yRange

c(<min y value>, <max y value).


jefferys/FusionExpressionPlot documentation built on May 19, 2019, 3:59 a.m.