[Bioc-devel] Error running table() on an RleList returned by coverage()

Hervé Pagès hpages at fhcrc.org
Mon Oct 6 22:48:47 CEST 2014


Hi Rory,

See my answer on the support site about this (posted this morning).
Thanks,

H.

On 10/06/2014 01:46 PM, Rory Stark wrote:
> I posted this earlier on the main support site, but I realize I should have posted it here.
>
>
> 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
>
> 	[[alternative HTML version deleted]]
>
> _______________________________________________
> Bioc-devel at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/bioc-devel
>

-- 
Hervé Pagès

Program in Computational Biology
Division of Public Health Sciences
Fred Hutchinson Cancer Research Center
1100 Fairview Ave. N, M1-B514
P.O. Box 19024
Seattle, WA 98109-1024

E-mail: hpages at fhcrc.org
Phone:  (206) 667-5791
Fax:    (206) 667-1319



More information about the Bioc-devel mailing list