[Bioc-devel] Apparent bug in rtracklayer, *-to-BigWigSelection coercion methods(?)

Steve Lianoglou mailinglist.honeypot at gmail.com
Tue Aug 14 01:01:48 CEST 2012


Hi,

I think I must be doing something wrong because whenever I'm using a
GRanges object to import data from a BigWig, I always end up w/ this
error:

   'score' is the only valid column for BigWig

Tracing through rtracklayer,bigWig.R it seems that my GRanges object
is ultimately converted to a BigWigSelection via a few coercions:
GRanges -> RangesList -> RangedSelection -> BigWigSelection.

Problem is that this creates a "BigWigSelection" object with a
colnames slot always set to `character()` (from the
IRanges::RangesList -> RangedSelection step), but really should be
"score".

One easy fix could be to tweak the coercion method form RangesList to
BigWigSelection to set the `colnames` slot directly, eg:

setAs("RangesList", "BigWigSelection", function(from) {
  new("BigWigSelection", as(from, "RangedSelection"), colnames="score")
})

Not sure if I'm doing something incorrectly, because I imagine this
bug would have popped up already, but it seems necessary for me to
tweak rtracklayer like that to get it to work.

If I'm doing something wrong, please let me know.

relevant sessionInfo()

R 2.15.1
IRanges_1.15.32
rtracklayer_1.17.16

Thanks,
-steve

-- 
Steve Lianoglou
Graduate Student: Computational Systems Biology
 | Memorial Sloan-Kettering Cancer Center
 | Weill Medical College of Cornell University
Contact Info: http://cbio.mskcc.org/~lianos/contact



More information about the Bioc-devel mailing list