[Bioc-devel] rtracklayer: Export to bigwig with unused seqlevels
julian.gehring at embl.de
Mon Mar 31 10:03:13 CEST 2014
Thanks, works all fine now.
On 28/03/14 22:05, Michael Lawrence wrote:
> Thanks, should be resolved in 1.23.20 (devel).
> On Fri, Mar 28, 2014 at 8:09 AM, Julian Gehring <julian.gehring at embl.de
> <mailto:julian.gehring at embl.de>> wrote:
> Exporting a GRanges object to the 'bigwig' format with rtracklayer fails
> if not all seqlevels are used:
> #+BEGIN_SRC R
> ## example data
> lg = reduce(unstrand(longGR))
> lg$score = 1:6
> ## full one works
> export(lg, tempfile(), "bw") ## works
> ## generally works if all seqlevels are used
> lg1 = lg[c(1, 3, 5)]
> export(lg1, tempfile(), "bw") ## works
> ## subset works if all seqlevels are used
> lg2 = lg[1:4]
> export(lg2, tempfile(), "bw") ## fails
> lg3 = keepSeqlevels(lg2, unique(as.character(seqnames(lg2))))
> export(lg3, tempfile(), "bw") ## works
> This fails with the latest bioc-devel (rtracklayer_1.23.18) and works
> with bioc-stable.
> A solution may be to remove unused seqlevels in the object, perhaps with
> a warning/message that not all seqlevels were exported.
> Best wishes
> Bioc-devel at r-project.org <mailto:Bioc-devel at r-project.org> mailing list
More information about the Bioc-devel