iSEE / iSEEu

The iSEE Universe
https://bioconductor.org/packages/devel/bioc/html/iSEEu.html
MIT License
9 stars 7 forks source link

Issue with ReducedDimensionHexPlot #103

Closed lgeistlinger closed 2 years ago

lgeistlinger commented 2 years ago

Hi, I wanted to try out the cool new ReducedDimensionHexPlot but I have trouble to get the example from ?ReducedDimensionHexPlot to work.

If I follow:

library(scRNAseq)
# Example data ----
sce <- ReprocessedAllenData(assays="tophat_counts")
class(sce)
library(scater)
sce <- logNormCounts(sce, exprs_values="tophat_counts")
sce <- runPCA(sce, ncomponents=4)
sce <- runTSNE(sce)
rowData(sce)$ave_count <- rowMeans(assay(sce, "tophat_counts"))
rowData(sce)$n_cells <- rowSums(assay(sce, "tophat_counts") > 0)
# launch the app itself ----
if (interactive()) {
iSEE(sce, initial=list(
ReducedDimensionHexPlot(BinResolution=50),
ReducedDimensionPlot()
))
}

I end up with an empty HexPlot panel:

Screen Shot 2022-04-27 at 12 04 34 PM

and a warning

Warning: Computation failed in `stat_binhex()`:

Here is my sessionInfo()

> sessionInfo()
R Under development (unstable) (2022-01-05 r81453)
Platform: x86_64-apple-darwin21.1.0 (64-bit)
Running under: macOS Monterey 12.3

Matrix products: default
BLAS:   /Users/ludwig/Downloads/R-devel/lib/libRblas.dylib
LAPACK: /Users/ludwig/Downloads/R-devel/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    stats     graphics  grDevices utils     datasets  methods  
[8] base     

other attached packages:
 [1] shiny_1.7.1                 scater_1.23.6              
 [3] ggplot2_3.3.5               scuttle_1.5.0              
 [5] scRNAseq_2.9.2              iSEEu_1.7.1                
 [7] iSEE_2.7.0                  SingleCellExperiment_1.17.2
 [9] SummarizedExperiment_1.25.3 Biobase_2.55.0             
[11] GenomicRanges_1.47.5        GenomeInfoDb_1.31.1        
[13] IRanges_2.29.1              S4Vectors_0.33.9           
[15] BiocGenerics_0.41.2         MatrixGenerics_1.7.0       
[17] matrixStats_0.61.0         

loaded via a namespace (and not attached):
  [1] circlize_0.4.13               AnnotationHub_3.3.7          
  [3] BiocFileCache_2.3.3           igraph_1.3.1                 
  [5] lazyeval_0.2.2                shinydashboard_0.7.2         
  [7] splines_4.2.0                 BiocParallel_1.29.10         
  [9] digest_0.6.29                 foreach_1.5.1                
 [11] ensembldb_2.19.7              htmltools_0.5.2              
 [13] viridis_0.6.2                 fansi_0.5.0                  
 [15] magrittr_2.0.1                memoise_2.0.1                
 [17] ScaledMatrix_1.3.0            cluster_2.1.2                
 [19] doParallel_1.0.16             ComplexHeatmap_2.11.0        
 [21] Biostrings_2.63.1             prettyunits_1.1.1            
 [23] colorspace_2.0-2              blob_1.2.2                   
 [25] rappdirs_0.3.3                ggrepel_0.9.1.9999           
 [27] dplyr_1.0.7                   crayon_1.4.2                 
 [29] RCurl_1.98-1.5                jsonlite_1.7.2               
 [31] iterators_1.0.13              glue_1.6.0                   
 [33] gtable_0.3.0                  zlibbioc_1.41.0              
 [35] XVector_0.35.0                GetoptLong_1.0.5             
 [37] DelayedArray_0.21.2           BiocSingular_1.11.0          
 [39] shape_1.4.6                   scales_1.1.1              
[41] DBI_1.1.2                     miniUI_0.1.1.1               
 [43] Rcpp_1.0.7                    viridisLite_0.4.0            
 [45] xtable_1.8-4                  progress_1.2.2               
 [47] clue_0.3-60                   rsvd_1.0.5                   
 [49] bit_4.0.4                     DT_0.20                      
 [51] htmlwidgets_1.5.4             httr_1.4.2                   
 [53] RColorBrewer_1.1-2            shinyAce_0.4.1               
 [55] ellipsis_0.3.2                farver_2.1.0                 
 [57] pkgconfig_2.0.3               XML_3.99-0.8                 
 [59] sass_0.4.0                    dbplyr_2.1.1                 
 [61] utf8_1.2.2                    labeling_0.4.2               
 [63] tidyselect_1.1.1              rlang_1.0.2                  
 [65] later_1.3.0                   AnnotationDbi_1.57.1         
 [67] munsell_0.5.0                 BiocVersion_3.15.0           
 [69] tools_4.2.0                   cachem_1.0.6                 
 [71] cli_3.3.0                     generics_0.1.1               
 [73] RSQLite_2.2.9                 ExperimentHub_2.3.4          
 [75] rintrojs_0.3.0                stringr_1.4.0                
 [77] fastmap_1.1.0                 yaml_2.2.1                   
 [79] bit64_4.0.5                   purrr_0.3.4                  
 [81] KEGGREST_1.35.0               AnnotationFilter_1.19.0      
 [83] sparseMatrixStats_1.7.0       nlme_3.1-153                 
 [85] mime_0.12                     xml2_1.3.3                   
 [87] biomaRt_2.51.2                compiler_4.2.0               
 [89] beeswarm_0.4.0                filelock_1.0.2               
 [91] curl_4.3.2                    png_0.1-7                    
 [93] interactiveDisplayBase_1.33.0 tibble_3.1.6                 
 [95] bslib_0.3.1                   stringi_1.7.6                
 [97] GenomicFeatures_1.47.5        lattice_0.20-45              
 [99] ProtGenerics_1.27.2           Matrix_1.4-0                 
[101] shinyjs_2.1.0                 vctrs_0.3.8                  
[103] pillar_1.6.4                  lifecycle_1.0.1              
[105] BiocManager_1.30.16           jquerylib_0.1.4              
[107] GlobalOptions_0.1.2           BiocNeighbors_1.13.0         
[109] irlba_2.3.5                   bitops_1.0-7                 
[111] httpuv_1.6.5                  rtracklayer_1.55.3           
[113] R6_2.5.1                      BiocIO_1.5.0                 
[115] promises_1.2.0.1              gridExtra_2.3                
[117] vipor_0.4.5                   codetools_0.2-18             
[119] colourpicker_1.1.1            assertthat_0.2.1             
[121] fontawesome_0.2.2             rjson_0.2.21                 
[123] withr_2.4.3                   shinyWidgets_0.6.4           
[125] GenomicAlignments_1.31.2      Rsamtools_2.11.0             
[127] GenomeInfoDbData_1.2.7        mgcv_1.8-38                  
[129] parallel_4.2.0                hms_1.1.1                    
[131] beachmat_2.11.0               grid_4.2.0                   
[133] DelayedMatrixStats_1.17.0     Rtsne_0.16                   
[135] ggbeeswarm_0.6.0              restfulr_0.0.13

Could this be fixed?

csoneson commented 2 years ago

Thanks for the report. Could you try if installing the hexbin package solves the issue? I get the same issue as you even when trying to run the basic geom_hex() examples in ggplot2 in my clean R 4.2 installation, but installing hexbin solved it. Not sure if anything changed recently, but we should add that to our dependencies.

lgeistlinger commented 2 years ago

Thanks, that indeed did the trick for me!

csoneson commented 2 years ago

Dependency added in https://github.com/iSEE/iSEEu/commit/a7de87ce288cfe98c1009a9c3c96612aba90b357