computeVmat: A function to compute Vplot matrix

View source: R/vmat_utils.R

computeVmatR Documentation

A function to compute Vplot matrix

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

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

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

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