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

sc.plot2dWithMargins Error #39

Open
moshl opened this issue Oct 26, 2019 · 3 comments
Open

sc.plot2dWithMargins Error #39

moshl opened this issue Oct 26, 2019 · 3 comments

Comments

@moshl
Copy link

moshl commented Oct 26, 2019

Hi,the func "sc.plot2dWithMargins " was okay before, but now, it always report the error as below,
Error: $ operator is invalid for atomic vectors
hope you reply. Many thanks.
Mo

@chrisamiller
Copy link
Collaborator

I'd need to see some example code and data that I can use to reproduce the problem. Provide that, and I'll be happy to take a look. Also, pasting the output of sessionInfo() would be helpful!

@Ninomoriaty
Copy link

I meet the same problem when running run.R in manuscript/data/figure3 with data provided by https://github.com/genome/sciclone-meta and here is the output of my sessionInfo() result.

R version 3.6.1 (2019-07-05)
Platform: x86_64-conda_cos6-linux-gnu (64-bit)
Running under: Ubuntu 18.04.3 LTS

Matrix products: default
BLAS/LAPACK: /home/ninomoriaty/anaconda3/envs/EvolCancer/lib/R/lib/libRblas.so

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

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

other attached packages:
 [1] sciClone_1.1.0      TeachingDemos_2.10  MKmisc_1.6          plotrix_3.7-6       RColorBrewer_1.1-2  rgl_0.100.30       
 [7] bmm_0.3.1           NORMT3_1.0-3        ggplot2_3.2.1       IRanges_2.18.3      S4Vectors_0.22.1    BiocGenerics_0.30.0

loaded via a namespace (and not attached):
  [1] tidyselect_0.2.5                  RSQLite_2.1.2                     AnnotationDbi_1.46.1             
  [4] htmlwidgets_1.5.1                 BiocParallel_1.18.1               pdp_0.7.0                        
  [7] devtools_2.2.1                    munsell_0.5.0                     miniUI_0.1.1.1                   
 [10] withr_2.1.2                       colorspace_1.4-1                  GOSemSim_2.10.0                  
 [13] Biobase_2.44.0                    knitr_1.25                        rstudioapi_0.10                  
 [16] robustbase_0.93-5                 DOSE_3.10.2                       labeling_0.3                     
 [19] urltools_1.7.3                    GenomeInfoDbData_1.2.1            polyclip_1.10-0                  
 [22] bit64_0.9-7                       farver_1.1.0                      rprojroot_1.3-2                  
 [25] vctrs_0.2.0                       xfun_0.10                         timescape_1.8.0                  
 [28] R6_2.4.0                          GenomeInfoDb_1.20.0               graphlayouts_0.5.0               
 [31] manipulateWidget_0.10.0           bitops_1.0-6                      fgsea_1.10.1                     
 [34] gridGraphics_0.4-1                DelayedArray_0.10.0               assertthat_0.2.1                 
 [37] promises_1.1.0                    scales_1.0.0                      ggraph_2.0.0                     
 [40] enrichplot_1.4.0                  gtable_0.3.0                      processx_3.4.1                   
 [43] tidygraph_1.1.2                   rlang_0.4.1                       zeallot_0.1.0                    
 [46] splines_3.6.1                     rtracklayer_1.44.4                lazyeval_0.2.2                   
 [49] europepmc_0.3                     checkmate_1.9.4                   BiocManager_1.30.9               
 [52] reshape2_1.4.3                    crosstalk_1.0.0                   backports_1.1.5                  
 [55] httpuv_1.5.2                      Meskit_0.1.0                      qvalue_2.16.0                    
 [58] clusterProfiler_3.12.0            tools_3.6.1                       usethis_1.5.1                    
 [61] ggplotify_0.0.4                   ellipsis_0.3.0                    sessioninfo_1.1.1                
 [64] ggridges_0.5.1                    Rcpp_1.0.2                        plyr_1.8.4                       
 [67] progress_1.2.2                    zlibbioc_1.30.0                   purrr_0.3.3                      
 [70] RCurl_1.95-4.12                   ps_1.3.0                          prettyunits_1.0.2                
 [73] viridis_0.5.1                     cowplot_1.0.0                     SummarizedExperiment_1.14.1      
 [76] ggrepel_0.8.1                     fs_1.3.1                          magrittr_1.5                     
 [79] data.table_1.12.6                 DO.db_2.9                         triebeard_0.3.0                  
 [82] reactome.db_1.68.0                matrixStats_0.55.0                pkgload_1.0.2                    
 [85] hms_0.5.1                         mime_0.7                          xtable_1.8-4                     
 [88] XML_3.98-1.20                     gridExtra_2.3                     testthat_2.2.1                   
 [91] compiler_3.6.1                    tibble_2.1.3                      crayon_1.3.4                     
 [94] BSgenome.Hsapiens.UCSC.hg19_1.4.0 htmltools_0.4.0                   later_1.0.0                      
 [97] tidyr_1.0.0                       ReactomePA_1.28.0                 DBI_1.0.0                        
[100] tweenr_1.0.1                      corrplot_0.84                     MASS_7.3-51.4                    
[103] rappdirs_0.3.1                    Matrix_1.2-17                     cli_1.1.0                        
[106] igraph_1.2.4.1                    GenomicRanges_1.36.1              pkgconfig_2.0.3                  
[109] rvcheck_0.1.5                     GenomicAlignments_1.20.1          xml2_1.2.2                       
[112] webshot_0.5.1                     XVector_0.24.0                    clonevol_0.99.11                 
[115] stringr_1.4.0                     callr_3.3.2                       digest_0.6.22                    
[118] graph_1.62.0                      Biostrings_2.52.0                 fastmatch_1.1-0                  
[121] curl_4.2                          shiny_1.4.0                       Rsamtools_2.0.3                  
[124] graphite_1.30.0                   lifecycle_0.1.0                   nlme_3.1-141                     
[127] jsonlite_1.6                      desc_1.2.0                        viridisLite_0.3.0                
[130] limma_3.40.6                      BSgenome_1.52.0                   pillar_1.4.2                     
[133] ggsci_2.9                         lattice_0.20-38                   deconstructSigs_1.8.0            
[136] fastmap_1.0.1                     httr_1.4.1                        DEoptimR_1.0-8                   
[139] pkgbuild_1.0.6                    GO.db_3.8.2                       glue_1.3.1                       
[142] remotes_2.1.0                     UpSetR_1.4.0                      fishplot_0.5                     
[145] bit_1.1-14                        ggforce_0.3.1                     stringi_1.4.3                    
[148] blob_1.2.0                        memoise_1.1.0                     dplyr_0.8.3                      
[151] ape_5.3  

Thank you for your attention and we will be grateful for your reply.

Wang Chengwei

@Ninomoriaty
Copy link

After simply testing, I found that this line in function sc.plot2dWithMargins may cause the problem:

max.density <- max(tmp[["data"]][[1]]$ymax)

As the variable ymax is set to be NULL and tmp[["data"]][[1]] seems to be a vector, it may lead to the error:

Error: $ operator is invalid for atomic vectors

However, I meet another problem caused by downViewport('panel.3-4-3-4') and the error is :

Error in grid.Call.graphics(C_downviewport, name$name, strict) : 
  Viewport 'panel.3-4-3-4' was not found

This error confuses me as it seems that panel.3-4-3-4 appears only once and I don't know how to check it. I would be really thankful if there are any technical solutions provided.

Wang Chengwei

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

3 participants