Error running table() on an RleList returned by coverage()
1
0
Entering edit mode
Rory Stark ★ 5.2k
@rory-stark-5741
Last seen 7 weeks ago
Cambridge, UK

Our package build is breaking on a call to table() with the results of a call to coverage(). We pass in a GRanges and get back a RleList. This used to work.

Easiest way to reproduce is using the example from the GenomicRanges::coverage man page:

gr <- GRanges(
        seqnames=Rle(c("chr1", "chr2", "chr1", "chr3"), c(1, 3, 2, 4)),
        ranges=IRanges(1:10, end=10),
        strand=Rle(strand(c("-", "+", "*", "+", "-")), c(1, 2, 2, 3, 2)),
        seqlengths=c(chr1=11, chr2=12, chr3=13))
cvg <- coverage(gr)

What used to happen:

> table(cvg)
     0 1 2 3 4
chr1 1 4 1 5 0
chr2 3 1 1 7 0
chr3 9 1 1 1 1

What happens now:

> table(cvg)
Error in as.vector(x, mode) : invalid 'mode' argument

Can anyone help? I see that GenomicRanges is broken right now in the development build, perhaps this will be fixed when that is...

Cheers-

Rory

 

 
GenomicRanges S4Vectors • 1.5k views
ADD COMMENT
1
Entering edit mode
@herve-pages-1542
Last seen 14 hours ago
Seattle, WA, United States

Hi Rory,

I fixed that bug yesterday in IRanges 1.99.31 but the fix won't propagate to the public repos until tomorrow. In the mean time you can get IRanges 1.99.31 directly from svn:

  svn co https://hedgehog.fhcrc.org/bioconductor/trunk/madman/Rpacks/IRanges

user: readonly, password: readonly

Cheers,

H.

 

ADD COMMENT
0
Entering edit mode

Excellent, thanks Hervé!

-Rory

ADD REPLY

Login before adding your answer.

Traffic: 920 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6