Search
Question: Error running table() on an RleList returned by coverage()
0
gravatar for Rory Stark
4.0 years ago by
Rory Stark2.6k
CRUK, Cambridge, UK
Rory Stark2.6k wrote:

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

 

 
ADD COMMENTlink modified 4.0 years ago by Hervé Pagès ♦♦ 13k • written 4.0 years ago by Rory Stark2.6k
0
gravatar for Hervé Pagès
4.0 years ago by
Hervé Pagès ♦♦ 13k
United States
Hervé Pagès ♦♦ 13k wrote:

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 COMMENTlink written 4.0 years ago by Hervé Pagès ♦♦ 13k

Excellent, thanks Hervé!

-Rory

ADD REPLYlink written 4.0 years ago by Rory Stark10
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.2.0
Traffic: 202 users visited in the last hour