[BioC] ggbio plot coverage adjusted for library size

James W. MacDonald jmacdon at uw.edu
Wed Jul 9 23:26:17 CEST 2014


Hi,

Is there an easy way to adjust the coverage plots for library size? As 
an example, if I do

library(ggbio)
library(Rsamtools)
which <- GRanges("chr12", IRanges(29358072, 29367039))
bfl <- BamFileList(<path to bamfiles>)
p1 <- autoplot(TxDb.Mmusculus.UCSC.mm9.knownGene, which=which)
p2 <- autoplot(bfl, which=which)
c(tracks(p1), p2)

I get almost what I want, but the plot is misleading because the 
coverage is dependent on the library size, and I would like to account 
for that fact. Is there some way to incorporate the library size in the 
computation of the coverage? In other words, I would rather plot 
coverage/million reads or similar.

Thanks,

Jim


-- 
James W. MacDonald, M.S.
Biostatistician
University of Washington
Environmental and Occupational Health Sciences
4225 Roosevelt Way NE, # 100
Seattle WA 98105-6099



More information about the Bioconductor mailing list