plotVmat.default: A function to plot a computed Vmat

View source: R/vmat.R

plotVmat.defaultR Documentation

A function to plot a computed Vmat

Description

The default plotVmat method generates a ggplot representing a heatmap of fragment density.

Usage

## Default S3 method:
plotVmat(
  x,
  hm = 90,
  colors = COLORSCALE_VMAT,
  breaks = NULL,
  xlim = c(-250, 250),
  ylim = c(50, 300),
  main = "",
  xlab = "Distance from center of elements",
  ylab = "Fragment length",
  key = "Score",
  ...
)

Arguments

x

A computed Vmat (ideally, should be normalized)

hm

Integer, should be between 0 and 100. Used to automatically scale the range of colors (best to keep between 90 and 100)

colors

a vector of colors

breaks

a vector of breaks. length(breaks) == length(colors) + 1

xlim

vector of two integers, x limits

ylim

vector of two integers, y limits

main

character, title of the plot

xlab

character, x-axis label

ylab

character, y-axis label

key

character, legend label

...

additional parameters

Value

A Vmat ggplot

Examples

data(bam_test)
data(ce11_proms)
V <- plotVmat(
    bam_test,
    ce11_proms,
    normFun = 'libdepth+nloci', 
    return_Vmat = TRUE
)
plotVmat(V)

js2264/VplotR documentation built on Jan. 4, 2024, 7:49 p.m.