Hi,

I'm using rtracklayer with RangedData and Rle to analyze numerical tracks
from wig and bigwig files.

Ideally I'd like to convert the RangedData that comes from import.bw into
Rle format; however, the only way to do this (quickly) appears to be the
IRanges function coverage(x, weight = 'score'), where x is a RangedData
object.

The problem is that coverage() only accepts integer weights.  This works
fine for integer tracks (e.g. counts) but does not readily work RangedData
with a floating point "score".

My interim solution for non-integer RangedData has been a hack: I multiply
the score of the input RangedData by 10^(precision), run coverage, and then
divide the Rle output by 10^(precision).   This is an ok fix for now,
however in the long term could cause ugly rounding problems (eg for tracks
with more than 8 log orders magnitude difference between the smallest and
largest score +/- high degree of interval overlap).

Any suggestions for better approaches for dealing with this problem?
Session info below.

Thanks in advance,

Marcin

R version 2.14.0 (2011-10-31)
Platform: x86_64-unknown-linux-gnu (64-bit)

	[[alternative HTML version deleted]]

