matrixPlotter: Plot upper half of a matrix rotated -45 degrees.

Description Usage Arguments Value Author(s) Examples

Description

This function inputs a matrix along with an optional GenomicRanges object and plots the upper half of the matrix rotated -45 degrees.

Usage

1
2
3
matrixPlotter(mat, granges = NULL, plotGR = NULL, extend = 0.5,
  heightProp = 1/3, zlim = NULL, colorBias = 1, highlight = NULL,
  colRamp = "YlOrRd", colPalette = NULL, smoothFilt = NULL)

Arguments

mat

A n x n symmetric matrix to plot.

granges

An optional genomic ranges object of length n representing the genomic coordinates the rows and columns of the matrix.

plotGR

A GenomicRanges object indicating the genomic region to be plotted. This option is ignored if granges is not provided.

extend

Proportion of the plotting region to extend both upstream and downstream. These extra regions are normally be plotted, but if white spaces appear in the upper corners of the plot, consider increasing the value of this parameter.

heightProp

Proportion of the plotting region (x-axis) to plot in the y-axis.

zlim

Limit for the maximum value of z (color) to plot. Larger values will be truncated to this parameter.

colorBias

Bias parameter for color palette (see ?colorRampPalette).

highlight

Optional. A GenomicRanges object indicating a region to highlight. If specified, A box would be drawn around this region.

colRamp

A name of a color palette (see ?brewer.pal).

colPalette

A vector of colors in hexadecimal format. Overwrites the palette for colRamp.

smoothFilt

An optional smoothing function for the matrix.

Value

A ggplot2 object.

Author(s)

Alejandro Reyes

Examples

1
2
3
4
5
6
7
8
9
library(HiTC)
data(Dixon2012_IMR90, package="HiCDataHumanIMR90")
mat <- as.matrix( hic_imr90_40@.Data[[1]]@intdata )
granges <- hic_imr90_40@.Data[[1]]@xgi
pl <- matrixPlotter( log2(mat+1), granges, plotGR=GRanges("chr1", IRanges( 50000000, 60000000 ) ), zlim=5 ) 
## Not run: 
print(pl)

## End(Not run)

areyesq89/GenomeMatrix documentation built on May 24, 2019, 2:51 p.m.