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

Error in plotPDF() #2150

Closed
sokratiag opened this issue Apr 17, 2024 · 3 comments
Closed

Error in plotPDF() #2150

sokratiag opened this issue Apr 17, 2024 · 3 comments
Labels
bug Something isn't working

Comments

@sokratiag
Copy link

Hi,

I am getting an error when trying to use plotPDF() function (sessioninfo below):

Plotting Ggplot!

Error in g$grobs[[legend]]: no such index at level 2

Traceback:

  1. plotPDF(p1, p2, p3, p4, name = "Plot-UMAP-Own_UMAP_Clusters_sample_multiome_EJ1.pdf",
    . ArcRProj = proj_multiome, addDOC = FALSE, width = 10,
    . height = 10)
  2. tryCatch({
    . pdf(filename, width = width, height = height, useDingbats = useDingbats)
    . for (i in seq_along(plotList)) {
    . if (inherits(plotList[[i]], "gg")) {
    . if (inherits(plotList[[i]], "patchwork")) {
    . if (getArchRVerbose())
    . message("Plotting Patchwork!")
    . print(plotList[[i]])
    . }
    . else {
    . if (getArchRVerbose())
    . message("Plotting Ggplot!")
    . if (!is.null(attr(plotList[[i]], "ratioYX"))) {
    . .fixPlotSize(plotList[[i]], plotWidth = width,
    . plotHeight = height, height = attr(plotList[[i]],
    . "ratioYX"), newPage = FALSE)
    . }
    . else {
    . .fixPlotSize(plotList[[i]], plotWidth = width,
    . plotHeight = height, newPage = FALSE)
    . }
    . }
    . if (i != length(plotList)) {
    . grid::grid.newpage()
    . }
    . }
    . else if (inherits(plotList[[i]], "gtable")) {
    . if (getArchRVerbose())
    . message("Plotting Gtable!")
    . print(grid::grid.draw(plotList[[i]]))
    . if (i != length(plotList)) {
    . grid::grid.newpage()
    . }
    . }
    . else if (inherits(plotList[[i]], "HeatmapList") | inherits(plotList[[i]],
    . "Heatmap")) {
    . if (getArchRVerbose())
    . message("Plotting ComplexHeatmap!")
    . padding <- 15
    . draw(plotList[[i]], padding = unit(c(padding, padding,
    . padding, padding), "mm"), heatmap_legend_side = "bot",
    . annotation_legend_side = "bot")
    . }
    . else {
    . if (getArchRVerbose())
    . message("Plotting Other")
    . print(plotList[[i]])
    . }
    . }
    . dev.off()
    . }, error = function(x) {
    . if (getArchRVerbose())
    . message(x)
    . })
  3. tryCatchList(expr, classes, parentenv, handlers)
  4. tryCatchOne(expr, names, parentenv, handlers[[1L]])
  5. value[3L]
  6. message(x)
  7. withRestarts({
    . signalCondition(cond)
    . defaultHandler(cond)
    . }, muffleMessage = function() NULL)
  8. withOneRestart(expr, restarts[[1L]])
  9. doWithOneRestart(return(expr), restart)

R version 4.3.3 (2024-02-29)
Platform: x86_64-conda-linux-gnu (64-bit)
Running under: CentOS Linux 7 (Core)

Matrix products: default
BLAS/LAPACK: /mnt/mr01-home01/b28763sg/anaconda3/envs/r_mul/lib/libopenblasp-r0.3.26.so; LAPACK version 3.12.0

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

time zone: Europe/London
tzcode source: system (glibc)

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

other attached packages:
[1] remotes_2.5.0 scDblFinder_1.16.0
[3] viridis_0.6.5 viridisLite_0.4.2
[5] SingleR_2.4.1 scran_1.30.2
[7] scater_1.30.1 scuttle_1.12.0
[9] scales_1.3.0 KernSmooth_2.23-22
[11] igraph_2.0.3 ggrepel_0.9.5
[13] ggforce_0.4.2 ggbeeswarm_0.7.2
[15] enrichR_3.2 DropletUtils_1.22.0
[17] SingleCellExperiment_1.24.0 cowplot_1.1.3
[19] bluster_1.12.0 AnnotationHub_3.10.0
[21] BiocFileCache_2.10.2 dbplyr_2.5.0
[23] SeuratObject_5.0.1 Seurat_4.3.0
[25] hdf5r_1.3.10 HDF5Array_1.30.1
[27] DelayedArray_0.28.0 SparseArray_1.2.4
[29] S4Arrays_1.2.1 abind_1.4-5
[31] lubridate_1.9.3 forcats_1.0.0
[33] dplyr_1.1.4 purrr_1.0.2
[35] readr_2.1.5 tidyr_1.3.1
[37] tibble_3.2.1 tidyverse_2.0.0
[39] rhdf5_2.46.1 SummarizedExperiment_1.32.0
[41] Biobase_2.62.0 MatrixGenerics_1.14.0
[43] Rcpp_1.0.12 Matrix_1.6-5
[45] GenomicRanges_1.54.1 GenomeInfoDb_1.38.8
[47] IRanges_2.36.0 S4Vectors_0.40.2
[49] BiocGenerics_0.48.1 matrixStats_1.3.0
[51] data.table_1.15.4 stringr_1.5.1
[53] plyr_1.8.9 magrittr_2.0.3
[55] ggplot2_3.4.2 gtable_0.3.4
[57] gtools_3.9.5 gridExtra_2.3
[59] ArchR_1.0.2

loaded via a namespace (and not attached):
[1] spatstat.sparse_3.0-3 bitops_1.0-7
[3] httr_1.4.7 RColorBrewer_1.1-3
[5] repr_1.1.7 tools_4.3.3
[7] sctransform_0.4.1 utf8_1.2.4
[9] R6_2.5.1 lazyeval_0.2.2
[11] uwot_0.2.1 rhdf5filters_1.14.1
[13] withr_3.0.0 sp_2.1-3
[15] progressr_0.14.0 cli_3.6.2
[17] Cairo_1.6-2 spatstat.explore_3.2-7
[19] labeling_0.4.3 spatstat.data_3.0-4
[21] ggridges_0.5.6 pbapply_1.7-2
[23] Rsamtools_2.18.0 pbdZMQ_0.3-11
[25] R.utils_2.12.3 parallelly_1.37.1
[27] WriteXLS_6.5.0 BSgenome_1.70.2
[29] limma_3.58.1 RSQLite_2.3.6
[31] BiocIO_1.12.0 generics_0.1.3
[33] ica_1.0-3 spatstat.random_3.2-3
[35] fansi_1.0.6 R.methodsS3_1.8.2
[37] lifecycle_1.0.4 yaml_2.3.8
[39] edgeR_4.0.16 Rtsne_0.17
[41] blob_1.2.4 promises_1.3.0
[43] dqrng_0.3.2 crayon_1.5.2
[45] miniUI_0.1.1.1 lattice_0.22-6
[47] beachmat_2.18.0 KEGGREST_1.42.0
[49] metapod_1.10.1 pillar_1.9.0
[51] rjson_0.2.21 xgboost_1.7.7.1
[53] future.apply_1.11.2 codetools_0.2-20
[55] leiden_0.4.3.1 glue_1.7.0
[57] vctrs_0.6.5 png_0.1-8
[59] spam_2.10-0 cachem_1.0.8
[61] mime_0.12 survival_3.5-8
[63] statmod_1.5.0 interactiveDisplayBase_1.40.0
[65] fitdistrplus_1.1-11 ROCR_1.0-11
[67] nlme_3.1-164 bit64_4.0.5
[69] filelock_1.0.3 RcppAnnoy_0.0.22
[71] irlba_2.3.5.1 vipor_0.4.7
[73] colorspace_2.1-0 DBI_1.2.2
[75] tidyselect_1.2.1 bit_4.0.5
[77] compiler_4.3.3 curl_5.2.1
[79] BiocNeighbors_1.20.2 BSgenome.Mmusculus.UCSC.mm10_1.4.3
[81] plotly_4.10.4 rtracklayer_1.62.0
[83] lmtest_0.9-40 rappdirs_0.3.3
[85] digest_0.6.35 goftest_1.2-3
[87] spatstat.utils_3.0-4 XVector_0.42.0
[89] htmltools_0.5.8.1 pkgconfig_2.0.3
[91] base64enc_0.1-3 sparseMatrixStats_1.14.0
[93] fastmap_1.1.1 rlang_1.1.3
[95] htmlwidgets_1.6.4 shiny_1.8.1.1
[97] DelayedMatrixStats_1.24.0 farver_2.1.1
[99] zoo_1.8-12 jsonlite_1.8.8
[101] BiocParallel_1.36.0 R.oo_1.26.0
[103] BiocSingular_1.18.0 RCurl_1.98-1.14
[105] GenomeInfoDbData_1.2.11 dotCall64_1.1-1
[107] patchwork_1.2.0 Rhdf5lib_1.24.2
[109] IRkernel_1.3.2 munsell_0.5.1
[111] reticulate_1.36.0 stringi_1.8.3
[113] zlibbioc_1.48.2 MASS_7.3-60.0.1
[115] parallel_4.3.3 listenv_0.9.1
[117] deldir_2.0-4 Biostrings_2.70.3
[119] IRdisplay_1.1 splines_4.3.3
[121] tensor_1.5 hms_1.1.3
[123] locfit_1.5-9.9 uuid_1.2-0
[125] spatstat.geom_3.2-9 reshape2_1.4.4
[127] ScaledMatrix_1.10.0 XML_3.99-0.16.1
[129] BiocVersion_3.18.1 evaluate_0.23
[131] BiocManager_1.30.22 tzdb_0.4.0
[133] tweenr_2.0.3 httpuv_1.6.15
[135] RANN_2.6.1 polyclip_1.10-6
[137] future_1.33.2 scattermore_1.2
[139] rsvd_1.0.5 xtable_1.8-4
[141] restfulr_0.0.15 later_1.3.2
[143] GenomicAlignments_1.38.2 memoise_2.0.1
[145] beeswarm_0.4.0 AnnotationDbi_1.64.1
[147] cluster_2.1.6 timechange_0.3.0
[149] globals_0.16.3

I would appreciate your help.

Thanks!

@sokratiag sokratiag added the bug Something isn't working label Apr 17, 2024
@rcorces
Copy link
Collaborator

rcorces commented Apr 17, 2024

Hi @sokratiag! Thanks for using ArchR! Lately, it has been very challenging for me to keep up with maintenance of this package and all of my other
responsibilities as a PI. I have not been responding to issue posts and I have not been pushing updates to the software. We are actively searching to hire
a computational biologist to continue to develop and maintain ArchR and related tools. If you know someone who might be a good fit, please let us know!
In the meantime, your issue will likely go without a reply. Most issues with ArchR right not relate to compatibility. Try reverting to R 4.1 and Bioconductor 3.15.
Newer versions of Seurat and Matrix also are causing issues. Sorry for not being able to provide active support for this package at this time.

@hhlhhlhhl
Copy link

I also encountered the same error. Have you solved this error?

@sokratiag
Copy link
Author

Hi,

I downgraded some packages and it works now - I think the issue was with ggplot2, I downgraded to version 3.4.2. I also used: options("Seurat.object.assay.version" = "v3").

R version 4.2.3 (2023-03-15)
Platform: x86_64-conda-linux-gnu (64-bit)
Running under: CentOS Linux 7 (Core)

Matrix products: default
BLAS/LAPACK: /mnt/mr01-home01/b28763sg/anaconda3/envs/r42/lib/libopenblasp-r0.3.27.so

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

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

other attached packages:
[1] BSgenome.Mmusculus.UCSC.mm10_1.4.3 BSgenome_1.66.3
[3] rtracklayer_1.58.0 Biostrings_2.66.0
[5] XVector_0.38.0 scDblFinder_1.12.0
[7] viridis_0.6.5 viridisLite_0.4.2
[9] SingleR_2.0.0 scran_1.26.2
[11] scater_1.26.1 scuttle_1.8.4
[13] scales_1.3.0 KernSmooth_2.23-22
[15] igraph_2.0.3 ggrepel_0.9.5
[17] ggforce_0.4.2 ggbeeswarm_0.7.2
[19] enrichR_3.2 DropletUtils_1.18.1
[21] SingleCellExperiment_1.20.1 cowplot_1.1.3
[23] bluster_1.8.0 AnnotationHub_3.6.0
[25] BiocFileCache_2.6.1 dbplyr_2.5.0
[27] Seurat_5.0.3 SeuratObject_5.0.1
[29] sp_2.1-3 hdf5r_1.3.10
[31] HDF5Array_1.26.0 DelayedArray_0.24.0
[33] lubridate_1.9.3 forcats_1.0.0
[35] dplyr_1.1.4 purrr_1.0.2
[37] readr_2.1.5 tidyr_1.3.1
[39] tibble_3.2.1 tidyverse_2.0.0
[41] rhdf5_2.42.1 SummarizedExperiment_1.28.0
[43] Biobase_2.58.0 MatrixGenerics_1.10.0
[45] Rcpp_1.0.12 Matrix_1.6-5
[47] GenomicRanges_1.50.2 GenomeInfoDb_1.34.9
[49] IRanges_2.32.0 S4Vectors_0.36.2
[51] BiocGenerics_0.44.0 matrixStats_1.3.0
[53] data.table_1.15.4 stringr_1.5.1
[55] plyr_1.8.9 magrittr_2.0.3
[57] ggplot2_3.4.2 gtable_0.3.5
[59] gtools_3.9.5 gridExtra_2.3
[61] ArchR_1.0.2

loaded via a namespace (and not attached):
[1] rappdirs_0.3.3 pbdZMQ_0.3-11
[3] scattermore_1.2 R.methodsS3_1.8.2
[5] bit64_4.0.5 irlba_2.3.5.1
[7] R.utils_2.12.3 KEGGREST_1.38.0
[9] RCurl_1.98-1.14 generics_0.1.3
[11] ScaledMatrix_1.6.0 RSQLite_2.3.6
[13] RANN_2.6.1 future_1.33.2
[15] bit_4.0.5 tzdb_0.4.0
[17] spatstat.data_3.0-4 httpuv_1.6.15
[19] hms_1.1.3 evaluate_0.23
[21] promises_1.3.0 fansi_1.0.6
[23] restfulr_0.0.15 DBI_1.2.2
[25] htmlwidgets_1.6.4 spatstat.geom_3.2-9
[27] RSpectra_0.16-1 deldir_2.0-4
[29] sparseMatrixStats_1.10.0 vctrs_0.6.5
[31] ROCR_1.0-11 abind_1.4-5
[33] cachem_1.0.8 withr_3.0.0
[35] progressr_0.14.0 sctransform_0.4.1
[37] GenomicAlignments_1.34.1 goftest_1.2-3
[39] cluster_2.1.6 IRdisplay_1.1
[41] dotCall64_1.1-1 lazyeval_0.2.2
[43] crayon_1.5.2 spatstat.explore_3.2-7
[45] edgeR_3.40.2 pkgconfig_2.0.3
[47] tweenr_2.0.3 nlme_3.1-164
[49] vipor_0.4.7 rlang_1.1.3
[51] globals_0.16.3 lifecycle_1.0.4
[53] miniUI_0.1.1.1 filelock_1.0.3
[55] fastDummies_1.7.3 rsvd_1.0.5
[57] polyclip_1.10-6 RcppHNSW_0.6.0
[59] lmtest_0.9-40 IRkernel_1.3.2
[61] Rhdf5lib_1.20.0 zoo_1.8-12
[63] base64enc_0.1-3 beeswarm_0.4.0
[65] ggridges_0.5.6 png_0.1-8
[67] rjson_0.2.21 bitops_1.0-7
[69] R.oo_1.26.0 spam_2.10-0
[71] rhdf5filters_1.10.1 blob_1.2.4
[73] DelayedMatrixStats_1.20.0 parallelly_1.37.1
[75] spatstat.random_3.2-3 beachmat_2.14.2
[77] memoise_2.0.1 ica_1.0-3
[79] zlibbioc_1.44.0 compiler_4.2.3
[81] dqrng_0.3.2 BiocIO_1.8.0
[83] RColorBrewer_1.1-3 fitdistrplus_1.1-11
[85] Rsamtools_2.14.0 cli_3.6.2
[87] listenv_0.9.1 patchwork_1.2.0
[89] pbapply_1.7-2 MASS_7.3-60.0.1
[91] tidyselect_1.2.1 stringi_1.8.3
[93] yaml_2.3.8 BiocSingular_1.14.0
[95] locfit_1.5-9.9 tools_4.2.3
[97] timechange_0.3.0 future.apply_1.11.2
[99] parallel_4.2.3 uuid_1.2-0
[101] metapod_1.6.0 farver_2.1.1
[103] Rtsne_0.17 digest_0.6.35
[105] BiocManager_1.30.22 shiny_1.8.1.1
[107] BiocVersion_3.16.0 later_1.3.2
[109] RcppAnnoy_0.0.22 WriteXLS_6.5.0
[111] httr_1.4.7 AnnotationDbi_1.60.2
[113] colorspace_2.1-0 XML_3.99-0.16.1
[115] tensor_1.5 reticulate_1.36.1
[117] splines_4.2.3 uwot_0.2.2
[119] statmod_1.5.0 spatstat.utils_3.0-4
[121] xgboost_1.7.7.1 plotly_4.10.4
[123] xtable_1.8-4 jsonlite_1.8.8
[125] R6_2.5.1 pillar_1.9.0
[127] htmltools_0.5.8.1 mime_0.12
[129] glue_1.7.0 fastmap_1.1.1
[131] BiocParallel_1.32.6 BiocNeighbors_1.16.0
[133] interactiveDisplayBase_1.36.0 codetools_0.2-20
[135] utf8_1.2.4 lattice_0.22-6
[137] spatstat.sparse_3.0-3 curl_5.2.1
[139] leiden_0.4.3.1 survival_3.6-4
[141] limma_3.54.2 repr_1.1.7
[143] munsell_0.5.1 GenomeInfoDbData_1.2.9
[145] reshape2_1.4.4

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants