Open wibom opened 6 years ago
Same issue
> library(ggbio)
Loading required package: BiocGenerics
Loading required package: parallel
Attaching package: ‘BiocGenerics’
The following objects are masked from ‘package:parallel’:
clusterApply, clusterApplyLB, clusterCall, clusterEvalQ, clusterExport, clusterMap, parApply, parCapply, parLapply, parLapplyLB,
parRapply, parSapply, parSapplyLB
The following objects are masked from ‘package:stats’:
IQR, mad, sd, var, xtabs
The following objects are masked from ‘package:base’:
anyDuplicated, append, as.data.frame, cbind, colMeans, colnames, colSums, do.call, duplicated, eval, evalq, Filter, Find, get,
grep, grepl, intersect, is.unsorted, lapply, lengths, Map, mapply, match, mget, order, paste, pmax, pmax.int, pmin, pmin.int,
Position, rank, rbind, Reduce, rowMeans, rownames, rowSums, sapply, setdiff, sort, table, tapply, union, unique, unsplit, which,
which.max, which.min
Loading required package: ggplot2
Need specific help about ggbio? try mailing
the maintainer or visit http://tengfei.github.com/ggbio/
Attaching package: 'ggbio'
The following objects are masked from 'package:ggplot2':
geom_bar, geom_rect, geom_segment, ggsave, stat_bin, stat_identity, xlim
> library(TxDb.Hsapiens.UCSC.hg19.knownGene)
Loading required package: GenomicFeatures
Loading required package: S4Vectors
Loading required package: stats4
Attaching package: 'S4Vectors'
The following object is masked from 'package:base':
expand.grid
Loading required package: IRanges
Loading required package: GenomeInfoDb
Loading required package: GenomicRanges
Loading required package: AnnotationDbi
Loading required package: Biobase
Welcome to Bioconductor
Vignettes contain introductory material; view with 'browseVignettes()'. To cite Bioconductor, see 'citation("Biobase")', and for
packages 'citation("pkgname")'.
> data(genesymbol, package = "biovizBase")
> txdb <- TxDb.Hsapiens.UCSC.hg19.knownGene
> p1 <- ggplot() + geom_alignment(txdb, which = genesymbol["RBM17"])
Parsing transcripts...
Parsing exons...
Parsing cds...
Parsing utrs...
------exons...
------cdss...
------introns...
------utr...
aggregating...
Done
Constructing graphics...
Error: Don't know how to add o to a plot
> sessionInfo()
R version 3.4.1 (2017-06-30)
Platform: x86_64-apple-darwin15.6.0 (64-bit)
Running under: macOS High Sierra 10.13.2
Matrix products: default
BLAS: /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libBLAS.dylib
LAPACK: /Library/Frameworks/R.framework/Versions/3.4/Resources/lib/libRlapack.dylib
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] stats4 parallel stats graphics grDevices utils datasets methods base
other attached packages:
[1] TxDb.Hsapiens.UCSC.hg19.knownGene_3.2.2 GenomicFeatures_1.28.5 AnnotationDbi_1.38.2
[4] Biobase_2.36.2 GenomicRanges_1.28.6 GenomeInfoDb_1.12.3
[7] IRanges_2.10.5 S4Vectors_0.14.7 ggbio_1.24.1
[10] ggplot2_2.2.1.9000 BiocGenerics_0.22.1
loaded via a namespace (and not attached):
[1] ProtGenerics_1.8.0 bitops_1.0-6 matrixStats_0.52.2 bit64_0.9-7
[5] RColorBrewer_1.1-2 httr_1.3.1 tools_3.4.1 backports_1.1.1
[9] R6_2.2.2 rpart_4.1-11 Hmisc_4.0-3 DBI_0.7
[13] lazyeval_0.2.1 colorspace_1.3-2 nnet_7.3-12 withr_2.1.1.9000
[17] gridExtra_2.3 GGally_1.3.2 bit_1.1-12 curl_3.0
[21] compiler_3.4.1 graph_1.54.0 htmlTable_1.9 DelayedArray_0.2.7
[25] rtracklayer_1.36.6 scales_0.5.0.9000 checkmate_1.8.5 RBGL_1.52.0
[29] stringr_1.2.0 digest_0.6.14 Rsamtools_1.28.0 foreign_0.8-69
[33] XVector_0.16.0 base64enc_0.1-3 dichromat_2.0-0 pkgconfig_2.0.1
[37] htmltools_0.3.6 ensembldb_2.0.4 BSgenome_1.44.2 htmlwidgets_0.9
[41] rlang_0.1.6.9003 RSQLite_2.0 BiocInstaller_1.26.1 shiny_1.0.5
[45] BiocParallel_1.10.1 acepack_1.4.1 VariantAnnotation_1.22.3 RCurl_1.95-4.8
[49] magrittr_1.5 GenomeInfoDbData_0.99.0 Formula_1.2-2 Matrix_1.2-11
[53] Rcpp_0.12.15 munsell_0.4.3 stringi_1.1.5 yaml_2.1.14
[57] SummarizedExperiment_1.6.5 zlibbioc_1.22.0 plyr_1.8.4 AnnotationHub_2.8.3
[61] grid_3.4.1 blob_1.1.0 lattice_0.20-35 Biostrings_2.44.2
[65] splines_3.4.1 knitr_1.17 pillar_1.1.0 reshape2_1.4.3
[69] biomaRt_2.32.1 XML_3.98-1.9 biovizBase_1.24.0 latticeExtra_0.6-28
[73] data.table_1.10.4-3 httpuv_1.3.5 gtable_0.2.0 reshape_0.8.7
[77] mime_0.5 xtable_1.8-2 AnnotationFilter_1.0.0 survival_2.41-3
[81] tibble_1.4.2 OrganismDbi_1.18.1 GenomicAlignments_1.12.2 memoise_1.1.0
[85] cluster_2.0.6 interactiveDisplayBase_1.14.0
Is this because you guys are using ggplot2 2.2.1.9000? I guess .9000 is the github version, which I'm not going to be able to support.
Yep, that was it. Didn't realize I was running the github version. Thanks. An extremely annoying error message....as it is not very informative.
I believe this may be broken again with the release of ggplot2 3.0.0.
I did the following:
library(ggbio)
library(TxDb.Hsapiens.UCSC.hg19.knownGene)
library(GenomicRanges)
library(biomaRt)
txdb <- TxDb.Hsapiens.UCSC.hg19.knownGene
range<-GRanges(paste("chr",cnv.chr,":",cnv.start,"-",cnv.end,sep=""))
exons<-subsetByOverlaps(exonsBy(txdb,"gene"),range)
autoplot(txdb,which=exons[[2]])
And got the error message:
Error: Don't know how to add o to a plot
With v3.0.0 of ggplot2, but recieved the lovely plot:
With v2.2.1 of ggplot2.
Thanks!
Please send a complete reproducible example. Right now the cnv.*
variables are missing.
Trying out
ggbio
for the first time. I get stuck on the first example I try:This gives the following output/error:
sessionInfo:
What gives?