computeVmat: A function to compute Vplot matrix

Description Usage Arguments Value Examples

View source: R/vmat_utils.R

Description

This function computes the underlying matrix shown as a heatmap in Vplots. For each pair of coordinates (x: distance from fragment midpoint to center of GRanges of interest; y: fragment size), the function computes how many fragments there are.

Usage

1
2
3
4
5
6
7
computeVmat(
  bam_granges,
  granges,
  cores = 1,
  xlims = c(-250, 250),
  ylims = c(50, 300)
)

Arguments

bam_granges

GRanges, paired-end fragments

granges

GRanges, regions to map the fragments onto

cores

Integer, nb of threads to parallelize fragments subsetting

xlims

The x limits of the computed Vmat

ylims

The y limits of the computed Vmat

Value

A table object

Examples

1
2
3
4
5
data(bam_test)
data(ce11_all_REs)
Vmat <- computeVmat(bam_test, ce11_all_REs)
dim(Vmat)
Vmat[seq(1,5), seq(1,10)]

VplotR documentation built on Nov. 8, 2020, 7:50 p.m.