normalizeVmat: A function to normalized a Vmat

Description Usage Arguments Value Examples

View source: R/vmat_utils.R

Description

This function normalizes a Vmat. Several different approaches have been implemented to normalize the Vmats.

Usage

1
2
3
4
5
6
7
8
9
normalizeVmat(
  Vmat,
  bam_granges,
  granges,
  normFun = c("zscore"),
  s = 0.99,
  roll = 1,
  verbose = TRUE
)

Arguments

Vmat

A Vmat, usually output of computeVmat

bam_granges

GRanges, the paired-end fragments

granges

GRanges, the regions to map the fragments onto

normFun

character. A Vmat should be scaled either by:

  • 'libdepth+nloci', e.g. the library depth and the number of loci used to compute the Vmat;

  • zscore, if relative patterns of fragment density are more important than density per se;

  • Alternatively, the Vmat can be scaled to a chosen quantile ('quantile') or to the max Vmat value ('max').

s

A float indicating which quantile to use if 'quantile' normalization is chosen

roll

integer, to use as the window to smooth the Vmat rows by rolling mean.

verbose

Boolean

Value

A normalized Vmat object

Examples

1
2
3
4
5
6
7
8
9
data(bam_test)
data(ce11_all_REs)
Vmat <- computeVmat(bam_test, ce11_all_REs)
Vmat <- normalizeVmat(
    Vmat, 
    bam_test, 
    ce11_all_REs,
    normFun = c('libdepth+nloci')
)

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