coverage.rpm {nucleR} | R Documentation

## Coverage calculation and normalization to reads per million (rpm)

### Description

Calculates the coverage values from a GenomicRanges::GRanges or IRanges::IRanges object normalized to reads per million, allowing the comparison of experiments with a different absolut number of reads.

### Usage

    coverage.rpm(data, scale = 1e+06, ...)

    ## S4 method for signature 'GRanges'
    coverage.rpm(data, scale = 1e+06, ...)

    ## S4 method for signature 'CompressedGRangesList'
    coverage.rpm(data, scale = 1e+06, ...)

    ## S4 method for signature 'IRanges'
    coverage.rpm(data, scale = 1e+06, ...)

    ## S4 method for signature 'RangedData'
    coverage.rpm(data, scale = 1e+06, ...)

### Arguments

`data` | GenomicRanges::GenomicRanges or IRanges::IRanges with the reads information
`scale` | By default, a million (1e6), but you could change this value for abnormal high or low amount of reads.
`...` | Additional arguments to be passed to `coverage` function

### Value

`RleList` object with the coverage objects

### Author(s)

Oscar Flores oflores@mmb.pcb.ub.es

### See Also

`processReads()`, `IRanges::coverage()`

### Examples

    # Load the example dataset and get the coverage
    data(nucleosome_htseq)
    cov <- coverage.rpm(nucleosome_htseq)
    print(cov)
    # Plot it
    library(ggplot2)
    cover <- as.vector(cov[["chr1"]])
    qplot(seq_along(cover), cover, geom="line", ylab="coverage",
      xlab="position")

[Package nucleR version 2.14.0 Index]