autoplot() error on a GRanges object in ggbio 1.10.8
1
0
Entering edit mode
@lcolladotor
Last seen 5 weeks ago
United States
Hello again Tengfei and BioC list, I am encountering a new error when using autoplot() on a GRanges and an annotation data base. I suspect that there is no annotation on the region I selected. For now I believe I can use a tryCatch() to pick up the error and avoid plotting this track on situations like this. But well, it would be nice if ggbio handled this error or maybe the cause it something else. > suppressMessages(library("ggbio")) > suppressMessages(library("GenomicRanges")) > suppressMessages(library("TxDb.Hsapiens.UCSC.hg19.knownGene")) > txdb <- TxDb.Hsapiens.UCSC.hg19.knownGene > wh <- GRanges("chr21", IRanges(47409355, 47409855)) > autoplot(txdb, which = wh, names.expr = "tx_name(gene_id)") Aggregating TranscriptDb... Parsing exons... Parsing cds... Parsing transcripts... Parsing utrs and aggregating... Error in DataFrame(...) : different row counts implied by arguments > traceback() 14: stop("different row counts implied by arguments") 13: DataFrame(...) 12: newGRanges("GRanges", seqnames = seqnames, ranges = ranges, strand = strand, mcols = DataFrame(...), seqlengths = seqlengths, seqinfo = seqinfo) 11: GRanges(seqnms, ir.utrs, tx_id = .nms, tx_name = .tx.nms, gene_id = .gid.nms, type = "utr") 10: .local(obj, ...) 9: crunch(object, which, truncate.gaps = truncate.gaps, truncate.fun = truncate.fun, ratio = ratio) 8: crunch(object, which, truncate.gaps = truncate.gaps, truncate.fun = truncate.fun, ratio = ratio) 7: .local(data, ...) 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(gene_id)", label = TRUE, which = <s4 object="" of="" class="" "granges"="">, list()) 5: (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(gene_id)", label = TRUE, which = <s4 object="" of="" class="" "granges"="">, list()) 4: do.call(geom_alignment, args.res) 3: .local(object, ...) 2: autoplot(txdb, which = wh, names.expr = "tx_name(gene_id)") 1: autoplot(txdb, which = wh, names.expr = "tx_name(gene_id)") > sessionInfo() R version 3.0.2 (2013-09-25) 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] TxDb.Hsapiens.UCSC.hg19.knownGene_2.10.1 GenomicFeatures_1.14.2 AnnotationDbi_1.24.0 [4] Biobase_2.22.0 GenomicRanges_1.14.3 XVector_0.2.0 [7] IRanges_1.20.5 BiocGenerics_0.8.0 ggbio_1.10.8 [10] ggplot2_0.9.3.1 loaded via a namespace (and not attached): [1] biomaRt_2.18.0 Biostrings_2.30.1 biovizBase_1.10.3 bitops_1.0-6 BSgenome_1.30.0 [6] cluster_1.14.4 colorspace_1.2-4 DBI_0.2-7 dichromat_2.0-0 digest_0.6.3 [11] grid_3.0.2 gridExtra_0.9.1 gtable_0.1.2 Hmisc_3.12-2 labeling_0.2 [16] lattice_0.20-24 MASS_7.3-29 munsell_0.4.2 plyr_1.8 proto_0.3-10 [21] RColorBrewer_1.0-5 RCurl_1.95-4.1 reshape2_1.2.2 rpart_4.1-3 Rsamtools_1.14.1 [26] RSQLite_0.11.4 rtracklayer_1.22.0 scales_0.2.3 stats4_3.0.2 stringr_0.6.2 [31] tools_3.0.2 VariantAnnotation_1.8.6 XML_3.95-0.2 zlibbioc_1.8.0 > Thank you! Leonardo Collado Torres, PhD student Department of Biostatistics Johns Hopkins University Bloomberg School of Public Health Website: http://www.biostat.jhsph.edu/~lcollado/<http: bit.ly="" lcolladotorres=""> Blog: http://lcolladotor.github.io/ <http: bit.ly="" fellbit=""> [[alternative HTML version deleted]]
Annotation TranscriptDb Annotation TranscriptDb • 2.1k views
ADD COMMENT
0
Entering edit mode
Tengfei Yin ▴ 490
@tengfei-yin-6162
Last seen 10.2 years ago
Hi again Leonardo :) I apologize for the inconvenience, frankly speaking, this version of ggbio/biovizBase is still more like devel version though it's already in release, but on the other hand, I can get lots of great feedback and fix them as fast as I could. Anyway, I found the bug and will fix them soon today. Thanks Tengfei On Fri, Nov 22, 2013 at 1:29 AM, Leonardo Collado Torres <lcollado@jhsph.edu> wrote: > Hello again Tengfei and BioC list, > > I am encountering a new error when using autoplot() on a GRanges and an > annotation data base. > > I suspect that there is no annotation on the region I selected. For now I > believe I can use a tryCatch() to pick up the error and avoid plotting this > track on situations like this. But well, it would be nice if ggbio handled > this error or maybe the cause it something else. > > > > > suppressMessages(library("ggbio")) > > suppressMessages(library("GenomicRanges")) > > suppressMessages(library("TxDb.Hsapiens.UCSC.hg19.knownGene")) > > txdb <- TxDb.Hsapiens.UCSC.hg19.knownGene > > wh <- GRanges("chr21", IRanges(47409355, 47409855)) > > autoplot(txdb, which = wh, names.expr = "tx_name(gene_id)") > Aggregating TranscriptDb... > Parsing exons... > Parsing cds... > Parsing transcripts... > Parsing utrs and aggregating... > Error in DataFrame(...) : different row counts implied by arguments > > traceback() > 14: stop("different row counts implied by arguments") > 13: DataFrame(...) > 12: newGRanges("GRanges", seqnames = seqnames, ranges = ranges, strand = > strand, > mcols = DataFrame(...), seqlengths = seqlengths, seqinfo = seqinfo) > 11: GRanges(seqnms, ir.utrs, tx_id = .nms, tx_name = .tx.nms, gene_id = > .gid.nms, > type = "utr") > 10: .local(obj, ...) > 9: crunch(object, which, truncate.gaps = truncate.gaps, truncate.fun = > truncate.fun, > ratio = ratio) > 8: crunch(object, which, truncate.gaps = truncate.gaps, truncate.fun = > truncate.fun, > ratio = ratio) > 7: .local(data, ...) > 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(gene_id)", label = TRUE, > which = <s4 object="" of="" class="" "granges"="">, list()) > 5: (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(gene_id)", label = TRUE, > which = <s4 object="" of="" class="" "granges"="">, list()) > 4: do.call(geom_alignment, args.res) > 3: .local(object, ...) > 2: autoplot(txdb, which = wh, names.expr = "tx_name(gene_id)") > 1: autoplot(txdb, which = wh, names.expr = "tx_name(gene_id)") > > sessionInfo() > R version 3.0.2 (2013-09-25) > 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] TxDb.Hsapiens.UCSC.hg19.knownGene_2.10.1 GenomicFeatures_1.14.2 > AnnotationDbi_1.24.0 > [4] Biobase_2.22.0 GenomicRanges_1.14.3 > XVector_0.2.0 > [7] IRanges_1.20.5 BiocGenerics_0.8.0 > ggbio_1.10.8 > [10] ggplot2_0.9.3.1 > > loaded via a namespace (and not attached): > [1] biomaRt_2.18.0 Biostrings_2.30.1 biovizBase_1.10.3 > bitops_1.0-6 BSgenome_1.30.0 > [6] cluster_1.14.4 colorspace_1.2-4 DBI_0.2-7 > dichromat_2.0-0 digest_0.6.3 > [11] grid_3.0.2 gridExtra_0.9.1 gtable_0.1.2 > Hmisc_3.12-2 labeling_0.2 > [16] lattice_0.20-24 MASS_7.3-29 munsell_0.4.2 > plyr_1.8 proto_0.3-10 > [21] RColorBrewer_1.0-5 RCurl_1.95-4.1 reshape2_1.2.2 > rpart_4.1-3 Rsamtools_1.14.1 > [26] RSQLite_0.11.4 rtracklayer_1.22.0 scales_0.2.3 > stats4_3.0.2 stringr_0.6.2 > [31] tools_3.0.2 VariantAnnotation_1.8.6 XML_3.95-0.2 > zlibbioc_1.8.0 > > > > > Thank you! > > Leonardo Collado Torres, PhD student > Department of Biostatistics > Johns Hopkins University > Bloomberg School of Public Health > Website: http://www.biostat.jhsph.edu/~lcollado/<http: bit.ly="" lcolladotorres=""> > Blog: http://lcolladotor.github.io/ <http: bit.ly="" fellbit=""> > > > > -- Tengfei Yin, PhD Seven Bridges Genomics sbgenomics.com 625 Mt. Auburn St. Suite #208 Cambridge, MA 02138 (617) 866-0446 [[alternative HTML version deleted]]
ADD COMMENT
0
Entering edit mode
just fixed in biovizBase 1.10.4 (bioc 2.13), biovizBase 1.11.4 (bioc 2.14 devel) Thanks, please let me know if you have further issues/problem. Tengfei On Fri, Nov 22, 2013 at 10:57 AM, Tengfei Yin <tengfei.yin@sbgenomics.com>wrote: > Hi again Leonardo :) > > I apologize for the inconvenience, frankly speaking, this version of > ggbio/biovizBase is still more like devel version though it's already in > release, but on the other hand, I can get lots of great feedback and fix > them as fast as I could. Anyway, I found the bug and will fix them soon > today. > > Thanks > > Tengfei > > > On Fri, Nov 22, 2013 at 1:29 AM, Leonardo Collado Torres < > lcollado@jhsph.edu> wrote: > >> Hello again Tengfei and BioC list, >> >> I am encountering a new error when using autoplot() on a GRanges and an >> annotation data base. >> >> I suspect that there is no annotation on the region I selected. For now I >> believe I can use a tryCatch() to pick up the error and avoid plotting this >> track on situations like this. But well, it would be nice if ggbio handled >> this error or maybe the cause it something else. >> >> >> >> > suppressMessages(library("ggbio")) >> > suppressMessages(library("GenomicRanges")) >> > suppressMessages(library("TxDb.Hsapiens.UCSC.hg19.knownGene")) >> > txdb <- TxDb.Hsapiens.UCSC.hg19.knownGene >> > wh <- GRanges("chr21", IRanges(47409355, 47409855)) >> > autoplot(txdb, which = wh, names.expr = "tx_name(gene_id)") >> Aggregating TranscriptDb... >> Parsing exons... >> Parsing cds... >> Parsing transcripts... >> Parsing utrs and aggregating... >> Error in DataFrame(...) : different row counts implied by arguments >> > traceback() >> 14: stop("different row counts implied by arguments") >> 13: DataFrame(...) >> 12: newGRanges("GRanges", seqnames = seqnames, ranges = ranges, strand = >> strand, >> mcols = DataFrame(...), seqlengths = seqlengths, seqinfo = >> seqinfo) >> 11: GRanges(seqnms, ir.utrs, tx_id = .nms, tx_name = .tx.nms, gene_id = >> .gid.nms, >> type = "utr") >> 10: .local(obj, ...) >> 9: crunch(object, which, truncate.gaps = truncate.gaps, truncate.fun = >> truncate.fun, >> ratio = ratio) >> 8: crunch(object, which, truncate.gaps = truncate.gaps, truncate.fun = >> truncate.fun, >> ratio = ratio) >> 7: .local(data, ...) >> 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(gene_id)", label = TRUE, >> which = <s4 object="" of="" class="" "granges"="">, list()) >> 5: (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(gene_id)", label = TRUE, >> which = <s4 object="" of="" class="" "granges"="">, list()) >> 4: do.call(geom_alignment, args.res) >> 3: .local(object, ...) >> 2: autoplot(txdb, which = wh, names.expr = "tx_name(gene_id)") >> 1: autoplot(txdb, which = wh, names.expr = "tx_name(gene_id)") >> > sessionInfo() >> R version 3.0.2 (2013-09-25) >> 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] TxDb.Hsapiens.UCSC.hg19.knownGene_2.10.1 GenomicFeatures_1.14.2 >> AnnotationDbi_1.24.0 >> [4] Biobase_2.22.0 GenomicRanges_1.14.3 >> XVector_0.2.0 >> [7] IRanges_1.20.5 BiocGenerics_0.8.0 >> ggbio_1.10.8 >> [10] ggplot2_0.9.3.1 >> >> loaded via a namespace (and not attached): >> [1] biomaRt_2.18.0 Biostrings_2.30.1 biovizBase_1.10.3 >> bitops_1.0-6 BSgenome_1.30.0 >> [6] cluster_1.14.4 colorspace_1.2-4 DBI_0.2-7 >> dichromat_2.0-0 digest_0.6.3 >> [11] grid_3.0.2 gridExtra_0.9.1 gtable_0.1.2 >> Hmisc_3.12-2 labeling_0.2 >> [16] lattice_0.20-24 MASS_7.3-29 munsell_0.4.2 >> plyr_1.8 proto_0.3-10 >> [21] RColorBrewer_1.0-5 RCurl_1.95-4.1 reshape2_1.2.2 >> rpart_4.1-3 Rsamtools_1.14.1 >> [26] RSQLite_0.11.4 rtracklayer_1.22.0 scales_0.2.3 >> stats4_3.0.2 stringr_0.6.2 >> [31] tools_3.0.2 VariantAnnotation_1.8.6 XML_3.95-0.2 >> zlibbioc_1.8.0 >> > >> >> >> Thank you! >> >> Leonardo Collado Torres, PhD student >> Department of Biostatistics >> Johns Hopkins University >> Bloomberg School of Public Health >> Website: http://www.biostat.jhsph.edu/~lcollado/<http: bit.ly="" lcolladotorres=""> >> Blog: http://lcolladotor.github.io/ <http: bit.ly="" fellbit=""> >> >> >> >> > > > -- > Tengfei Yin, PhD > Seven Bridges Genomics > sbgenomics.com > 625 Mt. Auburn St. Suite #208 > Cambridge, MA 02138 > (617) 866-0446 > -- Tengfei Yin, PhD Seven Bridges Genomics sbgenomics.com 625 Mt. Auburn St. Suite #208 Cambridge, MA 02138 (617) 866-0446 [[alternative HTML version deleted]]
ADD REPLY
0
Entering edit mode
Thank you for fixing this Tengfei! Just tested it on biovizBase 1.10.4 And I understand that ggbio is still being developed (which is great!) so things might break here and there. If I find anything, I'll let you know as usual =) Cheers, Leo On Fri, Nov 22, 2013 at 11:23 AM, Tengfei Yin <tengfei.yin@sbgenomics.com>wrote: > just fixed in biovizBase 1.10.4 (bioc 2.13), biovizBase 1.11.4 (bioc 2.14 > devel) > > Thanks, please let me know if you have further issues/problem. > > Tengfei > > > On Fri, Nov 22, 2013 at 10:57 AM, Tengfei Yin <tengfei.yin@sbgenomics.com>wrote: > >> Hi again Leonardo :) >> >> I apologize for the inconvenience, frankly speaking, this version of >> ggbio/biovizBase is still more like devel version though it's already in >> release, but on the other hand, I can get lots of great feedback and fix >> them as fast as I could. Anyway, I found the bug and will fix them soon >> today. >> >> Thanks >> >> Tengfei >> >> >> On Fri, Nov 22, 2013 at 1:29 AM, Leonardo Collado Torres < >> lcollado@jhsph.edu> wrote: >> >>> Hello again Tengfei and BioC list, >>> >>> I am encountering a new error when using autoplot() on a GRanges and an >>> annotation data base. >>> >>> I suspect that there is no annotation on the region I selected. For now >>> I believe I can use a tryCatch() to pick up the error and avoid plotting >>> this track on situations like this. But well, it would be nice if ggbio >>> handled this error or maybe the cause it something else. >>> >>> >>> >>> > suppressMessages(library("ggbio")) >>> > suppressMessages(library("GenomicRanges")) >>> > suppressMessages(library("TxDb.Hsapiens.UCSC.hg19.knownGene")) >>> > txdb <- TxDb.Hsapiens.UCSC.hg19.knownGene >>> > wh <- GRanges("chr21", IRanges(47409355, 47409855)) >>> > autoplot(txdb, which = wh, names.expr = "tx_name(gene_id)") >>> Aggregating TranscriptDb... >>> Parsing exons... >>> Parsing cds... >>> Parsing transcripts... >>> Parsing utrs and aggregating... >>> Error in DataFrame(...) : different row counts implied by arguments >>> > traceback() >>> 14: stop("different row counts implied by arguments") >>> 13: DataFrame(...) >>> 12: newGRanges("GRanges", seqnames = seqnames, ranges = ranges, strand = >>> strand, >>> mcols = DataFrame(...), seqlengths = seqlengths, seqinfo = >>> seqinfo) >>> 11: GRanges(seqnms, ir.utrs, tx_id = .nms, tx_name = .tx.nms, gene_id = >>> .gid.nms, >>> type = "utr") >>> 10: .local(obj, ...) >>> 9: crunch(object, which, truncate.gaps = truncate.gaps, truncate.fun = >>> truncate.fun, >>> ratio = ratio) >>> 8: crunch(object, which, truncate.gaps = truncate.gaps, truncate.fun = >>> truncate.fun, >>> ratio = ratio) >>> 7: .local(data, ...) >>> 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(gene_id)", label = TRUE, >>> which = <s4 object="" of="" class="" "granges"="">, list()) >>> 5: (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(gene_id)", label = TRUE, >>> which = <s4 object="" of="" class="" "granges"="">, list()) >>> 4: do.call(geom_alignment, args.res) >>> 3: .local(object, ...) >>> 2: autoplot(txdb, which = wh, names.expr = "tx_name(gene_id)") >>> 1: autoplot(txdb, which = wh, names.expr = "tx_name(gene_id)") >>> > sessionInfo() >>> R version 3.0.2 (2013-09-25) >>> 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] TxDb.Hsapiens.UCSC.hg19.knownGene_2.10.1 GenomicFeatures_1.14.2 >>> AnnotationDbi_1.24.0 >>> [4] Biobase_2.22.0 GenomicRanges_1.14.3 >>> XVector_0.2.0 >>> [7] IRanges_1.20.5 BiocGenerics_0.8.0 >>> ggbio_1.10.8 >>> [10] ggplot2_0.9.3.1 >>> >>> loaded via a namespace (and not attached): >>> [1] biomaRt_2.18.0 Biostrings_2.30.1 biovizBase_1.10.3 >>> bitops_1.0-6 BSgenome_1.30.0 >>> [6] cluster_1.14.4 colorspace_1.2-4 DBI_0.2-7 >>> dichromat_2.0-0 digest_0.6.3 >>> [11] grid_3.0.2 gridExtra_0.9.1 gtable_0.1.2 >>> Hmisc_3.12-2 labeling_0.2 >>> [16] lattice_0.20-24 MASS_7.3-29 munsell_0.4.2 >>> plyr_1.8 proto_0.3-10 >>> [21] RColorBrewer_1.0-5 RCurl_1.95-4.1 reshape2_1.2.2 >>> rpart_4.1-3 Rsamtools_1.14.1 >>> [26] RSQLite_0.11.4 rtracklayer_1.22.0 scales_0.2.3 >>> stats4_3.0.2 stringr_0.6.2 >>> [31] tools_3.0.2 VariantAnnotation_1.8.6 XML_3.95-0.2 >>> zlibbioc_1.8.0 >>> > >>> >>> >>> Thank you! >>> >>> Leonardo Collado Torres, PhD student >>> Department of Biostatistics >>> Johns Hopkins University >>> Bloomberg School of Public Health >>> Website: http://www.biostat.jhsph.edu/~lcollado/<http: bit.ly="" lcolladotorres=""> >>> Blog: http://lcolladotor.github.io/ <http: bit.ly="" fellbit=""> >>> >>> >>> >>> >> >> >> -- >> Tengfei Yin, PhD >> Seven Bridges Genomics >> sbgenomics.com >> 625 Mt. Auburn St. Suite #208 >> Cambridge, MA 02138 >> (617) 866-0446 >> > > > > -- > Tengfei Yin, PhD > Seven Bridges Genomics > sbgenomics.com > 625 Mt. Auburn St. Suite #208 > Cambridge, MA 02138 > (617) 866-0446 > [[alternative HTML version deleted]]
ADD REPLY

Login before adding your answer.

Traffic: 862 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