Cannot get ggbio autoplot to run successfully on R 3.2 (3.2.2 or 3.2.3)
1
1
Entering edit mode
danhovelson ▴ 10
@danhovelson-9481
Last seen 8.3 years ago

I'm encountering a persistent problem with ggbio's autoplot function using R 3.2 (I've tried both versions 3.2.2 and 3.2.3 (the latest release)).  Below example provide running 64-bit R 3.2.3 on Windows 7 (full session info provided at the bottom of this post).

Specifically, I'm attempting to generate a gene model graphic by running the following code (taken from pages 5 & 6 of the Bioconductor ggbio vignette found here):

library(ggbio)
library(Homo.sapiens)
class(Homo.sapiens)
data(genesymbol, package = "biovizBase")
wh <- genesymbol[c("BRCA1", "NBR1")]
wh <- range(wh, ignore.strand = TRUE)
p.txdb <- autoplot(Homo.sapiens, which = wh)

I've tried fresh installs of R (3.2.2 and 3.2.3) using executables downloaded from CRAN (e.g., 3.2.2 and 3.2.3, respectively) , along with fresh installs of ggbio (and it's dependencies) through Bioconductor. Each time I attempt to run the above code, I see the following (albeit with version-specific info at top):

R version 3.2.3 (2015-12-10) -- "Wooden Christmas-Tree"
Copyright (C) 2015 The R Foundation for Statistical Computing
Platform: x86_64-w64-mingw32/x64 (64-bit)

R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.

R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.

Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.

> 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, xtabs

The following objects are masked from ‘package:base’:

    anyDuplicated, append, as.data.frame, as.vector, cbind, colnames, 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, rownames, sapply, setdiff, sort, table, tapply, union, unique,
    unlist, unsplit

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

Warning messages:
1: replacing previous import by ‘ggplot2::unit’ when loading ‘ggbio’ 
2: replacing previous import by ‘ggplot2::arrow’ when loading ‘ggbio’ 
3: replacing previous import by ‘BiocGenerics::Position’ when loading ‘ggbio’ 
> library(Homo.sapiens)
Loading required package: AnnotationDbi
Loading required package: stats4
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")'.

Loading required package: IRanges
Loading required package: S4Vectors
Loading required package: OrganismDbi
Loading required package: GenomicFeatures
Loading required package: GenomeInfoDb
Loading required package: GenomicRanges
Loading required package: GO.db
Loading required package: DBI

Loading required package: org.Hs.eg.db

Loading required package: TxDb.Hsapiens.UCSC.hg19.knownGene
Now getting the GODb Object directly
Now getting the OrgDb Object directly
Now getting the TxDb Object directly
> class(Homo.sapiens)
[1] "OrganismDb"
attr(,"package")
[1] "OrganismDbi"
> data(genesymbol, package = "biovizBase")
> wh <- genesymbol[c("BRCA1", "NBR1")]
> wh <- range(wh, ignore.strand = TRUE)
> p.txdb <- autoplot(Homo.sapiens, which = wh)
Parsing transcripts...
Parsing exons...
Parsing cds...
Parsing utrs...
------exons...
------cdss...
------introns...
------utr...
aggregating...
Done
'select()' returned 1:1 mapping between keys and columns
"gap" not in any of the valid gene feature terms "cds", "exon", "utr"
Constructing graphics...
Error: Unknown parameters: arrow.rate

Seems like this probably has something to do with the warning messages about ggplot2 functions rate & arrow output when loading ggbio library. I've emailed the package maintainer at the email provided here, but no reply yet.  Other 'autoplot' uses for creating gene models also consistently fail with errors about unknown parameters arrow.rate and/or group.selfish.  Possible this issue is related to ggbio incompatibility with the latest version of ggplot2 as mentioned here (Error when install ggbio), but suggestion of installing the ggbio binary didn't fix this for me.  Any alternate suggestions greatly welcomed!  

Here is my session info:

R version 3.2.3 (2015-12-10)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 7 x64 (build 7601) Service Pack 1

locale:
[1] LC_COLLATE=English_United States.1252  LC_CTYPE=English_United States.1252   
[3] LC_MONETARY=English_United States.1252 LC_NUMERIC=C                          
[5] LC_TIME=English_United States.1252    

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

other attached packages:
 [1] Homo.sapiens_1.3.1                      TxDb.Hsapiens.UCSC.hg19.knownGene_3.2.2
 [3] org.Hs.eg.db_3.2.3                      GO.db_3.2.2                            
 [5] RSQLite_1.0.0                           DBI_0.3.1                              
 [7] OrganismDbi_1.12.1                      GenomicFeatures_1.22.7                 
 [9] GenomicRanges_1.22.3                    GenomeInfoDb_1.6.1                     
[11] AnnotationDbi_1.32.3                    IRanges_2.4.6                          
[13] S4Vectors_0.8.6                         Biobase_2.30.0                         
[15] ggbio_1.18.1                            ggplot2_2.0.0                          
[17] BiocGenerics_0.16.1                    

loaded via a namespace (and not attached):
 [1] SummarizedExperiment_1.0.2 VariantAnnotation_1.16.4   reshape2_1.4.1            
 [4] splines_3.2.3              lattice_0.20-33            colorspace_1.2-6          
 [7] rtracklayer_1.30.1         RBGL_1.46.0                survival_2.38-3           
[10] XML_3.98-1.3               foreign_0.8-66             BiocParallel_1.4.3        
[13] RColorBrewer_1.1-2         lambda.r_1.1.7             plyr_1.8.3                
[16] stringr_1.0.0              zlibbioc_1.16.0            Biostrings_2.38.3         
[19] munsell_0.4.2              gtable_0.1.2               futile.logger_1.4.1       
[22] latticeExtra_0.6-26        GGally_1.0.0               biomaRt_2.26.1            
[25] BiocInstaller_1.20.1       Rcpp_0.12.2                acepack_1.3-3.3           
[28] scales_0.3.0               BSgenome_1.38.0            graph_1.48.0              
[31] Hmisc_3.17-1               XVector_0.10.0             Rsamtools_1.22.0          
[34] gridExtra_2.0.0            stringi_1.0-1              biovizBase_1.18.0         
[37] grid_3.2.3                 tools_3.2.3                bitops_1.0-6              
[40] magrittr_1.5               RCurl_1.95-4.7             dichromat_2.0-0           
[43] Formula_1.2-1              cluster_2.0.3              futile.options_1.0.0      
[46] reshape_0.8.5              rpart_4.1-10               GenomicAlignments_1.6.3   
[49] nnet_7.3-11 

 

ggbio ggplot2 autoplot bioconductor gene models • 2.4k views
ADD COMMENT
0
Entering edit mode

I'm having similar issues since updating to ggplot2 2.0 ... Wondering if it's a coincidence...

ADD REPLY
0
Entering edit mode

I can actually get many of the other ggbio functions to run without error, but can't get autoplot to generate a gene model graphic similar to the user vignette (section 2.2.2).  Would love to hear if anyone identifies work-arounds/solutions.

ADD REPLY
0
Entering edit mode
snf ▴ 10
@snf-6981
Last seen 8.2 years ago
UC Berkeley

I was having the same issue, but it seems to be solved by upgrading to bioconductor 3.2, which installs ggbio v 1.18.3 among other things. I was at 3.1 beforehand. Still receive this warning:

"gap" not in any of the valid gene feature terms "cds", "exon", "utr"

but a plot is generated. Hope that helps.

sessionInfo()

R version 3.2.2 (2015-08-14)
Platform: x86_64-apple-darwin13.4.0 (64-bit)
Running under: OS X 10.9.5 (Mavericks)

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
[8] methods   base

other attached packages:
 [1] GenomicFeatures_1.22.8 AnnotationDbi_1.32.3   Biobase_2.30.0
 [4] GenomicRanges_1.22.3   GenomeInfoDb_1.6.2     IRanges_2.4.6
 [7] S4Vectors_0.8.7        ggbio_1.18.3           ggplot2_2.0.0
[10] BiocGenerics_0.16.1

loaded via a namespace (and not attached):
 [1] SummarizedExperiment_1.0.2 VariantAnnotation_1.16.4
 [3] reshape2_1.4.1             splines_3.2.2
 [5] lattice_0.20-33            colorspace_1.2-6
 [7] rtracklayer_1.30.1         XML_3.98-1.3
 [9] survival_2.38-3            RBGL_1.46.0
[11] foreign_0.8-66             DBI_0.3.1
[13] BiocParallel_1.4.3         RColorBrewer_1.1-2
[15] lambda.r_1.1.7             plyr_1.8.3
[17] stringr_1.0.0              zlibbioc_1.16.0
[19] Biostrings_2.38.3          munsell_0.4.2
[21] gtable_0.1.2               futile.logger_1.4.1
[23] OrganismDbi_1.12.1         labeling_0.3
[25] latticeExtra_0.6-26        GGally_1.0.1
[27] biomaRt_2.26.1             BiocInstaller_1.20.1
[29] Rcpp_0.12.3                acepack_1.3-3.3
[31] scales_0.3.0               BSgenome_1.38.0
[33] Hmisc_3.17-1               graph_1.48.0
[35] XVector_0.10.0             Rsamtools_1.22.0
[37] gridExtra_2.0.0            stringi_1.0-1
[39] biovizBase_1.18.0          grid_3.2.2
[41] tools_3.2.2                bitops_1.0-6
[43] magrittr_1.5               RCurl_1.95-4.7
[45] RSQLite_1.0.0              dichromat_2.0-0
[47] Formula_1.2-1              cluster_2.0.3
[49] futile.options_1.0.0       reshape_0.8.5
[51] rpart_4.1-10               GenomicAlignments_1.6.3
[53] nnet_7.3-11

 

ADD COMMENT
0
Entering edit mode

I just updated to bioConductor 3.2 and I am getting the exact same error.... I have R version 3.2.3 though, do you think that may have anything to do with it?

ADD REPLY

Login before adding your answer.

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