Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ggbio with facet_grid() #85

Closed
JokingHero opened this issue Nov 27, 2016 · 3 comments
Closed

ggbio with facet_grid() #85

JokingHero opened this issue Nov 27, 2016 · 3 comments

Comments

@JokingHero
Copy link

JokingHero commented Nov 27, 2016

Hi!

I get this error lately when trying to combine ggbio archplots with facets. Could you help me to get around this?

archRanges <- data.frame(strand = c("+", "+", "+"),
                     start = c(84, 60, 66),
                     end = c(96, 172, 180),
                     frequency = c(0.375, 0.125, 0.0625),
                     cut = c(1, 2, 1),
                     seqnames = c("ID_1", "ID_3", "ID_3"))

 arch_plot_top <- ggplot() + geom_arch(data = archRanges, 
                                      aes(alpha = frequency,
                                          size = frequency,
                                          x = start,
                                          xend = end))
arch_plot_bot <- ggplot() + geom_arch(data = archRanges,
                                      aes(alpha = frequency,
                                          size = frequency,
                                          x = start,
                                          xend = end)) + 
  facet_grid(seqnames ~ .)

ggbio::tracks(arch_plot_top,
              arch_plot_bot)

Error in mapply(child_vp, vp_name = vpname(x$layout), t = x$layout$t,  : 
  zero-length inputs cannot be mixed with those of non-zero length
In addition: Warning messages:
1: In min(g$layout[idx, ]$l) :
  no non-missing arguments to min; returning Inf
2: In max(g$layout[idx, ]$r) :
  no non-missing arguments to max; returning -Inf
3: In min(g$layout[idx, ]$l) :
  no non-missing arguments to min; returning Inf
4: In max(g$layout[idx, ]$r) :
  no non-missing arguments to max; returning -Inf

My sessionInfo():

R version 3.3.1 (2016-06-21)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Ubuntu 16.04.1 LTS

locale:
 [1] LC_CTYPE=en_US.UTF-8       LC_NUMERIC=C               LC_TIME=en_US.UTF-8        LC_COLLATE=en_US.UTF-8    
 [5] LC_MONETARY=en_US.UTF-8    LC_MESSAGES=en_US.UTF-8    LC_PAPER=en_US.UTF-8       LC_NAME=C                 
 [9] LC_ADDRESS=C               LC_TELEPHONE=C             LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C       

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

other attached packages:
[1] ggbio_1.22.0        ggplot2_2.2.0       BiocGenerics_0.20.0

loaded via a namespace (and not attached):
 [1] Rcpp_0.12.8                   biovizBase_1.22.0             lattice_0.20-34               Rsamtools_1.26.1             
 [5] Biostrings_2.42.0             assertthat_0.1                digest_0.6.10                 mime_0.5                     
 [9] R6_2.2.0                      GenomeInfoDb_1.10.1           plyr_1.8.4                    acepack_1.4.1                
[13] stats4_3.3.1                  RSQLite_1.0.0                 BiocInstaller_1.24.0          httr_1.2.1                   
[17] zlibbioc_1.20.0               GenomicFeatures_1.26.0        lazyeval_0.2.0                data.table_1.9.8             
[21] S4Vectors_0.12.0              rpart_4.1-10                  Matrix_1.2-7.1                labeling_0.3                 
[25] splines_3.3.1                 BiocParallel_1.8.1            AnnotationHub_2.6.4           stringr_1.1.0                
[29] foreign_0.8-67                RCurl_1.95-4.8                biomaRt_2.30.0                munsell_0.4.3                
[33] shiny_0.14.2                  httpuv_1.3.3                  rtracklayer_1.34.1            htmltools_0.3.5              
[37] nnet_7.3-12                   SummarizedExperiment_1.4.0    tibble_1.2                    gridExtra_2.2.1              
[41] htmlTable_1.7                 interactiveDisplayBase_1.12.0 Hmisc_4.0-0                   IRanges_2.8.1                
[45] XML_3.98-1.5                  reshape_0.8.6                 GenomicAlignments_1.10.0      bitops_1.0-6                 
[49] RBGL_1.50.0                   grid_3.3.1                    xtable_1.8-2                  GGally_1.3.0                 
[53] gtable_0.2.0                  DBI_0.5-1                     magrittr_1.5                  scales_0.4.1                 
[57] graph_1.52.0                  stringi_1.1.2                 XVector_0.14.0                reshape2_1.4.2               
[61] latticeExtra_0.6-28           Formula_1.2-1                 RColorBrewer_1.1-2            ensembldb_1.6.2              
[65] tools_3.3.1                   dichromat_2.0-0               OrganismDbi_1.16.0            BSgenome_1.42.0              
[69] Biobase_2.34.0                yaml_2.1.14                   survival_2.40-1               AnnotationDbi_1.36.0         
[73] colorspace_1.3-1              cluster_2.0.5                 GenomicRanges_1.26.1          VariantAnnotation_1.20.1     
[77] knitr_1.15.1    
@lawremi
Copy link
Owner

lawremi commented Nov 28, 2016

This is due to recent changes in ggplot2 (renamed grobs). It was fixed in devel last week and now I've pushed it to release. Watch for version 1.22.1.

@lawremi lawremi closed this as completed Nov 28, 2016
@JokingHero
Copy link
Author

Hi Michael,

I have installed the ggbio in version 1.23 from devel, but I still get the same error. Also ggbio stable is still 1.22, when will it update?

R version 3.3.1 (2016-06-21)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Ubuntu 16.04.1 LTS

locale:
 [1] LC_CTYPE=en_US.UTF-8       LC_NUMERIC=C               LC_TIME=en_GB.UTF-8        LC_COLLATE=en_US.UTF-8    
 [5] LC_MONETARY=en_GB.UTF-8    LC_MESSAGES=en_US.UTF-8    LC_PAPER=en_GB.UTF-8       LC_NAME=C                 
 [9] LC_ADDRESS=C               LC_TELEPHONE=C             LC_MEASUREMENT=en_GB.UTF-8 LC_IDENTIFICATION=C       

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

other attached packages:
[1] ggbio_1.23.0        BiocGenerics_0.20.0 ggplot2_2.2.0      

loaded via a namespace (and not attached):
 [1] Biobase_2.34.0                httr_1.2.1                    AnnotationHub_2.6.4           splines_3.3.1                
 [5] Formula_1.2-1                 shiny_0.14.2                  assertthat_0.1                interactiveDisplayBase_1.12.0
 [9] stats4_3.3.1                  latticeExtra_0.6-28           RBGL_1.50.0                   BSgenome_1.42.0              
[13] Rsamtools_1.26.1              yaml_2.1.14                   RSQLite_1.1                   lattice_0.20-34              
[17] biovizBase_1.22.0             digest_0.6.10                 GenomicRanges_1.26.1          RColorBrewer_1.1-2           
[21] XVector_0.14.0                colorspace_1.3-1              htmltools_0.3.5               httpuv_1.3.3                 
[25] Matrix_1.2-7.1                plyr_1.8.4                    OrganismDbi_1.16.0            XML_3.98-1.5                 
[29] biomaRt_2.30.0                zlibbioc_1.20.0               xtable_1.8-2                  scales_0.4.1                 
[33] BiocParallel_1.8.1            htmlTable_1.7                 tibble_1.2                    IRanges_2.8.1                
[37] SummarizedExperiment_1.4.0    GenomicFeatures_1.26.0        nnet_7.3-12                   lazyeval_0.2.0               
[41] survival_2.40-1               magrittr_1.5                  mime_0.5                      memoise_1.0.0                
[45] GGally_1.3.0                  foreign_0.8-67                graph_1.52.0                  BiocInstaller_1.24.0         
[49] tools_3.3.1                   data.table_1.9.8              stringr_1.1.0                 S4Vectors_0.12.1             
[53] munsell_0.4.3                 cluster_2.0.5                 AnnotationDbi_1.36.0          ensembldb_1.6.2              
[57] Biostrings_2.42.1             GenomeInfoDb_1.10.1           grid_3.3.1                    RCurl_1.95-4.8               
[61] dichromat_2.0-0               VariantAnnotation_1.20.2      labeling_0.3                  bitops_1.0-6                 
[65] gtable_0.2.0                  DBI_0.5-1                     reshape_0.8.6                 reshape2_1.4.2               
[69] R6_2.2.0                      GenomicAlignments_1.10.0      gridExtra_2.2.1               knitr_1.15.1                 
[73] rtracklayer_1.34.1            Hmisc_4.0-0                   stringi_1.1.2                 Rcpp_0.12.8                  
[77] rpart_4.1-10                  acepack_1.4.1

@lawremi
Copy link
Owner

lawremi commented Dec 2, 2016

I don't think any of the new versions have propagated due to additional problems with the new ggplot2. Unfortunately, I have no ETA on a fix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants