Plot coverage in a presentation for GenomicFeatures
1
0
Entering edit mode
cookie ▴ 20
@cookie-7508
Last seen 9.1 years ago
USA

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

genomicfeatures • 931 views
ADD COMMENT
2
Entering edit mode
@michael-lawrence-3846
Last seen 2.4 years ago
United States

We typically define coverage as the number of features overlapping a genomic position.

That function is just going to plot a vector (from a list "x", the element corresponding to "chrom") of Y values from the start index to end index (the X values). It does not really matter what the Y values are. I think Deepayan wrote it for our ChIP-seq course. At this point, I would recommend using ggbio, Gviz or epivizr to view coverage data.

ADD COMMENT

Login before adding your answer.

Traffic: 659 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6