Hi, While playing around with importing BigWig files I found that import.bw() fails when you use a `which` or `selection` that has more than one range and you specify `as = 'NumericList'`. The code and output are available at https://gist.github.com/lcolladotor/a0eafc335a2738de42f6. From the BigWigFile-class documentation, I suspect that this is a bug. The same thing happens even if I use BigWigFileSelection() instead of supplying a GRanges of length 2.
Also, what is the summary() function doing when you calculate the mean? I would expect it to be the same mean if I import the data as an Rle and calculate the mean there. See (after running the code in the gist): > x <- import(BigWigFile(bw[1]), as = 'RleList') > mean(x) chr21 0.02474045 > summary(BigWigFile(bw[1]), type = 'mean')[[1]]$score [1] 0.9037462 > mean(x[x > 0]) chr21 1.202603 It's not the mean of the non-zero positions either. Cheers, Leo Leonardo Collado Torres, PhD Candidate Department of Biostatistics Johns Hopkins University Bloomberg School of Public Health Website: http://www.biostat.jhsph.edu/~lcollado/ Blog: http://lcolladotor.github.io/ _______________________________________________ Bioc-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/bioc-devel