coverage.rpm {nucleR} | R Documentation |
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.
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, ...)
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 |
RleList
object with the coverage objects
Oscar Flores oflores@mmb.pcb.ub.es
processReads()
, IRanges::coverage()
# 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")