Skip to content

[Bioc-devel] rtracklayer::import( as = 'NumericList' ) doesn't work with more than 1 range

1 message · Leonardo Collado Torres

#
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):
chr21
0.02474045
[1] 0.9037462
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/