plotVmat.GRanges {VplotR} | R Documentation

## A function to compute (and plot) a Vmat

### Description

The plotVmat.GRanges() method computes and normalizes a Vmat before passing it to plotVmat.Vmat() method.

### Usage

    ## S3 method for class 'GRanges'
    plotVmat(
      x,
      granges,
      xlims = c(-250, 250),
      ylims = c(50, 300),
      normFun = "",
      s = 0.95,
      roll = 3,
      cores = 1,
      return_Vmat = FALSE,
      verbose = 1,
      ...
    )

### Arguments

`x` | GRanges, paired-end fragments
`granges` | GRanges, loci to map the fragments onto
`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.
`cores` | Integer, number of threads to parallelize fragments subsetting
`return_Vmat` | Boolean, should the function return the computed Vmat rather than the plot?
`verbose` | Boolean
`...` | additional parameters

### Value

A Vmat ggplot

### Examples

    data(bam_test)
    data(ce11_proms)
    V <- plotVmat(
        bam_test,
        ce11_proms,
        normFun = 'libdepth+nloci',
        roll = 5
    )

[Package VplotR version 1.4.0 Index]