Hi,
I found a presentation about the GenomicFeatures and its basic function.
In there, I found a function called plotCoverage. I am interested in what it does. Can someone explain it to me?
plotCoverage <-function(x, chrom, start=1, end=length(x[[chrom]]), col="blue", xlab="Index", ylab="Coverage", main=chrom) { xWindow <- as.vector(window(x[[chrom]], start, end)) x <- start:end xlim <- c(start, end) ylim <- c(0, max(xWindow)) plot(x = start, y = 0, xlim = xlim, ylim = ylim, xlab = xlab, ylab = ylab, main = main, type = "n") polygon(c(start, x, end), c(0, xWindow, 0), col = col) }
The problem is with the term coverage. What does coverage mean here? Is it about how many times a base is
covered by reads or is it about the fragments or ranges mapped along the chromosome?
Source:
http://master.bioconductor.org/help/course-materials/2010/EMBL2010/GenomicRanges.pdf