I suspect it's probably problem from ggbio itself, I didn't check
frequently with new update from dependencies, as soon as I got snow leopard
binary on my laptop today, I will start debugging!


On Wed, Apr 23, 2014 at 10:51 AM, Leonardo Collado Torres <
lcollado@jhsph.edu> wrote:

> Hello again,
>
> Looking back, I have a file from 2014-04-15 with ggbio 1.12.0 where
> autoplot() with a txdb was working.
>
> The code is not the same from the example I reported above, but it
> uses the same ggbio functionality. You can see the working output at
>
> https://rawgit.com/lcolladotor/derfinderReport/master/inst/basicExploration/basicExploration.html#Best_region_clusters
> while the R session is at the end of
>
> https://rawgit.com/lcolladotor/derfinderReport/master/inst/basicExploration/basicExploration.html#Details
>
> In particular, the working version used:
> * GenomicRanges 1.16.0 instead of 1.16.2
> * IRanges 1.22.2 instead of 1.22.3
> * GenomeInfoDb 1.0.1 instead of 1.0.2
>
> So, it seems that the problem is indeed related to recent updates to
> GenomicRanges (or maybe IRanges, GenomeInfoDb).
>
>
> On a different topic, there is no equivalent to using
> devtools::install_github(ref), right? With it, I can install a version
> of a GitHub-hosted package for a specific reference (which can be a
> specific commit).
>
> Thanks,
> Leonardo
>
>
> On Wed, Apr 23, 2014 at 12:10 AM, Leonardo Collado Torres
> <lcollado@jhsph.edu> wrote:
> > Hello Tengfei + bioc list,
> >
> > From
> http://www.bioconductor.org/packages/release/bioc/vignettes/ggbio/inst/doc/ggbio.pdf
> > page 4 (complied on april 11 2014), the following example loads to an
> > error as shown below. I wasn't seeing this error before (aka, last
> > week). The only guess that comes to mind is the recent update to
> > GenomicRanges (1.16.2) although that doesn't seem to be related from
> > the traceback() output, well... maybe it's related to the
> > ignore.strand = TRUE part as described in the error.
> >
> > I'll create a GitHub issue just for completeness.
> >
> > Thank you,
> > Leonardo
> >
> >> library(ggbio)
> > ## Removed the output, nothing out of ordinary
> >
> >> library(TxDb.Hsapiens.UCSC.hg19.knownGene)
> > ## Removed the output
> >
> >> txdb <- TxDb.Hsapiens.UCSC.hg19.knownGene
> >> data(genesymbol, package = "biovizBase")
> >> p.txdb <- autoplot(txdb, which = genesymbol["BRCA1"])
> > Aggregating TranscriptDb...
> > Parsing transcripts...
> > Parsing exons...
> > Parsing cds...
> > Parsing utrs...
> > ------exons...
> > ------cdss...
> > ------introns...
> > ------utr...
> > aggregating...
> > Done
> > Constructing graphics...
> > Error in sapply(listData, function(Xi) extends(class(Xi), elementTypeX))
> :
> >   error in evaluating the argument 'X' in selecting a method for
> > function 'sapply': Error in unlist(range(ranges(x.n, ignore.strand =
> > TRUE))) :
> >   error in evaluating the argument 'x' in selecting a method for
> > function 'unlist': Error in .local(x, ...) : unused argument
> > (ignore.strand = TRUE)
> >
> >> traceback()
> > 15: sapply(listData, function(Xi) extends(class(Xi), elementTypeX))
> > 14: .updateCompressedList(X, lapply_CompressedList(X, FUN, ...))
> > 13: endoapply(obj.lst, function(x) {
> >         if (!is.null(group.name)) {
> >             if (!group.selfish) {
> >                 x.n <- split(x, values(x)[, group.name])
> >                 irs <- unlist(range(ranges(x.n, ignore.strand = TRUE)))
> >                 irs.new <- resize(irs, fix = fix, width = width(irs) +
> >                     extend.size)
> >                 irs.new <- sort(irs.new)
> >                 .lvs <- disjointBins(irs.new)
> >                 values(x)$stepping <- .lvs[as.character(values(x)[,
> >                     group.name])]
> >                 x
> >             }
> >             else {
> >                 values(x)$stepping <- as.numeric(as.factor(values(x)[,
> >                     group.name]))
> >                 x
> >             }
> >         }
> >         else {
> >             irs <- ranges(x)
> >             values(x)$stepping <- as.numeric(disjointBins(resize(irs,
> >                 fix = "center", width = width(irs) + extend.size)))
> >             x
> >         }
> >     })
> > 12: endoapply(obj.lst, function(x) {
> >         if (!is.null(group.name)) {
> >             if (!group.selfish) {
> >                 x.n <- split(x, values(x)[, group.name])
> >                 irs <- unlist(range(ranges(x.n, ignore.strand = TRUE)))
> >                 irs.new <- resize(irs, fix = fix, width = width(irs) +
> >                     extend.size)
> >                 irs.new <- sort(irs.new)
> >                 .lvs <- disjointBins(irs.new)
> >                 values(x)$stepping <- .lvs[as.character(values(x)[,
> >                     group.name])]
> >                 x
> >             }
> >             else {
> >                 values(x)$stepping <- as.numeric(as.factor(values(x)[,
> >                     group.name]))
> >                 x
> >             }
> >         }
> >         else {
> >             irs <- ranges(x)
> >             values(x)$stepping <- as.numeric(disjointBins(resize(irs,
> >                 fix = "center", width = width(irs) + extend.size)))
> >             x
> >         }
> >     })
> > 11: .local(obj, ...)
> > 10: addStepping(gr, group.name = "tx_id", group.selfish = FALSE,
> >         fix = "start", extend.size = es)
> > 9: addStepping(gr, group.name = "tx_id", group.selfish = FALSE,
> >        fix = "start", extend.size = es)
> > 8: .local(data, ...)
> > 7: (function (data, ...)
> >    standardGeneric("geom_alignment"))(data = <S4 object of class
> > "TranscriptDb">,
> >        truncate.gaps = FALSE, ratio = 0.0025, geom = "alignment",
> >        stat = "identity", names.expr = "tx_name", label = TRUE,
> >        which = <S4 object of class "GRanges">, list())
> > 6: (function (data, ...)
> >    standardGeneric("geom_alignment"))(data = <S4 object of class
> > "TranscriptDb">,
> >        truncate.gaps = FALSE, ratio = 0.0025, geom = "alignment",
> >        stat = "identity", names.expr = "tx_name", label = TRUE,
> >        which = <S4 object of class "GRanges">, list())
> > 5: do.call(geom_alignment, args.res)
> > 4: do.call(geom_alignment, args.res)
> > 3: .local(object, ...)
> > 2: autoplot(txdb, which = genesymbol["BRCA1"])
> > 1: autoplot(txdb, which = genesymbol["BRCA1"])
> >
> >
> >> sessionInfo()
> > R version 3.1.0 (2014-04-10)
> > Platform: x86_64-apple-darwin10.8.0 (64-bit)
> >
> > locale:
> > [1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8
> >
> > attached base packages:
> > [1] parallel  stats     graphics  grDevices utils     datasets
> > methods   base
> >
> > other attached packages:
> >  [1] XVector_0.4.0
> > TxDb.Hsapiens.UCSC.hg19.knownGene_2.14.0 GenomicFeatures_1.16.0
> >  [4] AnnotationDbi_1.26.0                     Biobase_2.24.0
> >                 GenomicRanges_1.16.2
> >  [7] GenomeInfoDb_1.0.2                       IRanges_1.22.3
> >                 ggbio_1.12.0
> > [10] ggplot2_0.9.3.1                          BiocGenerics_0.10.0
> >
> > loaded via a namespace (and not attached):
> >  [1] BatchJobs_1.2            BBmisc_1.5
> > BiocParallel_0.6.0       biomaRt_2.20.0           Biostrings_2.32.0
> >  [6] biovizBase_1.12.0        bitops_1.0-6             brew_1.0-6
> >          BSgenome_1.32.0          cluster_1.15.2
> > [11] codetools_0.2-8          colorspace_1.2-4         DBI_0.2-7
> >          dichromat_2.0-0          digest_0.6.4
> > [16] fail_1.2                 foreach_1.4.2            Formula_1.1-1
> >          GenomicAlignments_1.0.0  grid_3.1.0
> > [21] gridExtra_0.9.1          gtable_0.1.2             Hmisc_3.14-4
> >          iterators_1.0.7          labeling_0.2
> > [26] lattice_0.20-29          latticeExtra_0.6-26      MASS_7.3-31
> >          munsell_0.4.2            plyr_1.8.1
> > [31] proto_0.3-10             RColorBrewer_1.0-5       Rcpp_0.11.1
> >          RCurl_1.95-4.1           reshape2_1.2.2
> > [36] Rsamtools_1.16.0         RSQLite_0.11.4
> > rtracklayer_1.24.0       scales_0.2.3             sendmailR_1.1-2
> > [41] splines_3.1.0            stats4_3.1.0             stringr_0.6.2
> >          survival_2.37-7          tools_3.1.0
> > [46] VariantAnnotation_1.10.0 XML_3.98-1.1             zlibbioc_1.10.0
> >>
>



-- 
Tengfei Yin, PhD
Seven Bridges Genomics
sbgenomics.com
625 Mt. Auburn St. Suite #208
Cambridge, MA 02138
(617) 866-0446

	[[alternative HTML version deleted]]

