This function normalizes a Vmat. Several different approaches have been implemented to normalize the Vmats.
normalizeVmat(
Vmat,
bam_granges,
granges,
normFun = c("zscore"),
s = 0.99,
roll = 1,
verbose = TRUE
)
A Vmat, usually output of computeVmat
GRanges, the paired-end fragments
GRanges, the regions to map the fragments onto
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').
A float indicating which quantile to use if 'quantile' normalization is chosen
integer, to use as the window to smooth the Vmat rows by rolling mean.
Boolean
A normalized Vmat object
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')
)
#> Computing raw library depth
#> Dividing Vmat by its number of loci