The plotVmat.GRanges() method computes and normalizes multiple Vmats before passing them to plotVmat.VmatList() method.

# S3 method for list
plotVmat(
  x,
  cores = 1,
  cores_subsetting = 1,
  nrow = NULL,
  ncol = NULL,
  xlims = c(-250, 250),
  ylims = c(50, 300),
  normFun = "libdepth+nloci",
  s = 0.95,
  roll = 3,
  return_Vmat = FALSE,
  verbose = 1,
  ...
)

Arguments

x

list Each element of the list should be a list containing paired-end fragments and GRanges of interest.

cores

Integer, number of cores to parallelize the plots

cores_subsetting

Integer, number of threads to parallelize fragments subsetting

nrow

Integer, how many rows in facet?

ncol

Integer, how many cols in facet?

xlims

x limits of the computed Vmat

ylims

y limits of the computed Vmat

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.

return_Vmat

Boolean, should the function return the computed Vmat rather than the plot?

verbose

Boolean

...

additional parameters

Value

A list of Vmat ggplots

Examples

data(bam_test)
data(ce11_proms)
list_params <- list(
    'germline' = list(
        bam_test,
        ce11_proms[ce11_proms$which.tissues == 'Germline']
    ),
    'muscle' = list(
        bam_test,
        ce11_proms[ce11_proms$which.tissues == 'Muscle']
    )
)
V <- plotVmat(
    list_params,
    normFun = 'libdepth+nloci', 
    roll = 5
)
#> - Processing sample 1/2
#> - Processing sample 2/2