[Bioc-devel] "[[<-" method dispatch and GenomicRanges

Michael Stadler michael.stadler at fmi.ch
Wed Apr 9 09:23:27 CEST 2014


Dear Bioc gurus,

Since a few days, QuasR devel (1.3.13 and 1.3.14) is failing on some
unit tests, which turns out to be reproducible independent of QuasR and
might be related to R getting the wrong method for "[[<-".

The following works fine...
library(GenomicRanges)
grl <- GRangesList(r1=GRanges("chr1",IRanges(1,2)),
                   r2=GRanges("chr2",IRanges(3,4)))
grl[[1]] <- GRanges("chr1",IRanges(10,11))


...but this produces an error:
library(GenomicRanges)
library(GenomicFeatures)
grl <- GRangesList(r1=GRanges("chr1",IRanges(1,2)),
                   r2=GRanges("chr2",IRanges(3,4)))
grl[[1]] <- GRanges("chr1",IRanges(10,11))
#Error in as.list(x, use.names = FALSE) :
#  could not find function ".as.list.CompressedList"

My guess is that loading the GenomicFeatures library in addition to
GenomicRanges influences the methods dispatch, but with my limited
understanding of R and S4 classes I was not able to narrow it further down.

I noticed that I am using a slightly older version of R (r65206)
compared to the build system (r65358), however I also see the error with
the most recent release candidate (r65385).

Michael


My session info:
R version 3.1.0 alpha (2014-03-17 r65206)
Platform: x86_64-unknown-linux-gnu (64-bit)

locale:
[1] C

attached base packages:
[1] parallel  stats     graphics  grDevices utils     datasets  methods
[8] base

other attached packages:
[1] GenomicFeatures_1.15.15 AnnotationDbi_1.25.17   Biobase_2.23.6
[4] GenomicRanges_1.15.44   GenomeInfoDb_0.99.30    IRanges_1.21.43
[7] BiocGenerics_0.9.3      RColorBrewer_1.0-5

loaded via a namespace (and not attached):
 [1] BBmisc_1.5                BSgenome_1.31.13
 [3] BatchJobs_1.2             BiocParallel_0.5.19
 [5] Biostrings_2.31.21        DBI_0.2-7
 [7] GenomicAlignments_0.99.37 RCurl_1.95-4.1
 [9] RSQLite_0.11.4            Rcpp_0.11.1
[11] Rsamtools_1.15.41         XML_3.98-1.1
[13] XVector_0.3.7             biomaRt_2.19.3
[15] bitops_1.0-6              brew_1.0-6
[17] codetools_0.2-8           digest_0.6.4
[19] fail_1.2                  foreach_1.4.1
[21] iterators_1.0.6           plyr_1.8.1
[23] rtracklayer_1.23.22       sendmailR_1.1-2
[25] stats4_3.1.0              stringr_0.6.2
[27] tools_3.1.0               zlibbioc_1.9.0



More information about the Bioc-devel mailing list