SCP
SCP copied to clipboard
Package or namespace load failed for ‘SCP’
Hello Hao,
I am experiencing an issue while trying to load the package. The error message I'm receiving is as follows:
Error: package or namespace load failed for ‘SCP’:
object ‘LayerData<-’ is not exported by 'namespace:SeuratObject'
I attempted to troubleshoot this issue from the Seurat/SeuratObject end but I haven't been successful yet. Any assistance you could provide would be greatly appreciated!
To help reproduce the issue, here is my session info:
R version 4.2.2 (2022-10-31)
Platform: aarch64-apple-darwin20 (64-bit)
Running under: macOS Monterey 12.6.5
Matrix products: default
LAPACK: /Library/Frameworks/R.framework/Versions/4.2-arm64/Resources/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 base
other attached packages:
[1] slingshot_2.6.0 TrajectoryUtils_1.6.0 SingleCellExperiment_1.20.1 SummarizedExperiment_1.28.0
[5] Biobase_2.58.0 GenomicRanges_1.50.2 GenomeInfoDb_1.34.9 IRanges_2.32.0
[9] S4Vectors_0.36.2 BiocGenerics_0.44.0 MatrixGenerics_1.10.0 matrixStats_1.0.0
[13] princurve_2.1.6 ggthemes_4.2.4 RColorBrewer_1.1-3 patchwork_1.1.2
[17] lubridate_1.9.2 forcats_1.0.0 stringr_1.5.0 dplyr_1.1.2
[21] purrr_1.0.1 readr_2.1.4 tidyr_1.3.0 tibble_3.2.1
[25] ggplot2_3.4.2 tidyverse_2.0.0 SCpubr_1.1.2.9000 harmony_0.1.1
[29] Rcpp_1.0.11 data.table_1.14.8 SeuratObject_4.1.3 Seurat_4.3.0
[33] CytoTRACE_0.3.3
loaded via a namespace (and not attached):
[1] scattermore_1.1 R.methodsS3_1.8.2 ragg_1.2.5 bit64_4.0.5
[5] irlba_2.3.5.1 DelayedArray_0.24.0 R.utils_2.12.2 KEGGREST_1.38.0
[9] RCurl_1.98-1.12 doParallel_1.0.17 generics_0.1.3 callr_3.7.3
[13] cowplot_1.1.1 usethis_2.1.6 RSQLite_2.3.1 RANN_2.6.1
[17] future_1.32.0 bit_4.0.5 tzdb_0.4.0 HiClimR_2.2.1
[21] spatstat.data_3.0-1 httpuv_1.6.11 hms_1.1.3 promises_1.2.0.1
[25] DEoptimR_1.1-0 fansi_1.0.4 igraph_1.5.0 DBI_1.1.3
[29] htmlwidgets_1.6.2 spacexr_2.2.1 spatstat.geom_3.2-1 ellipsis_0.3.2
[33] annotate_1.76.0 sparseMatrixStats_1.10.0 deldir_1.0-9 vctrs_0.6.3
[37] remotes_2.4.2 here_1.0.1 ROCR_1.0-11 abind_1.4-5
[41] cachem_1.0.8 withr_2.5.0 robustbase_0.99-0 progressr_0.13.0
[45] sctransform_0.3.5 prettyunits_1.1.1 goftest_1.2-3 cluster_2.1.4
[49] lazyeval_0.2.2 crayon_1.5.2 genefilter_1.80.3 spatstat.explore_3.2-1
[53] edgeR_3.40.2 pkgconfig_2.0.3 labeling_0.4.2 nlme_3.1-162
[57] pkgload_1.3.2.1 devtools_2.4.5 rlang_1.1.1 globals_0.16.2
[61] lifecycle_1.0.3 miniUI_0.1.1.1 rsvd_1.0.5 rprojroot_2.0.3
[65] polyclip_1.10-4 lmtest_0.9-40 Matrix_1.5-4 zoo_1.8-12
[69] ggridges_0.5.4 GlobalOptions_0.1.2 processx_3.8.2 png_0.1-8
[73] viridisLite_0.4.2 rjson_0.2.21 bitops_1.0-7 R.oo_1.25.0
[77] KernSmooth_2.23-21 Biostrings_2.66.0 DelayedMatrixStats_1.20.0 blob_1.2.4
[81] shape_1.4.6 parallelly_1.36.0 spatstat.random_3.1-5 R.cache_0.16.0
[85] scales_1.2.1 memoise_2.0.1 magrittr_2.0.3 plyr_1.8.8
[89] ica_1.0-3 zlibbioc_1.44.0 compiler_4.2.2 clue_0.3-64
[93] fitdistrplus_1.1-11 Rsamtools_2.14.0 cli_3.6.1 XVector_0.38.0
[97] urlchecker_1.0.1 SeuratWrappers_0.3.1 listenv_0.9.0 pbapply_1.7-0
[101] ps_1.7.5 MASS_7.3-60 mgcv_1.8-42 tidyselect_1.2.0
[105] stringi_1.7.12 textshaping_0.3.6 locfit_1.5-9.7 ggrepel_0.9.3
[109] grid_4.2.2 tools_4.2.2 timechange_0.2.0 future.apply_1.11.0
[113] parallel_4.2.2 circlize_0.4.15 rstudioapi_0.14 ccaPP_0.3.3
[117] foreach_1.5.2 gridExtra_2.3 farver_2.1.1 Rtsne_0.16
[121] digest_0.6.33 BiocManager_1.30.20 shiny_1.7.4.1 later_1.3.1
[125] RcppAnnoy_0.0.20 ncdf4_1.21 httr_1.4.6 AnnotationDbi_1.60.2
[129] ComplexHeatmap_2.15.4 colorspace_2.1-0 XML_3.99-0.14 fs_1.6.2
[133] tensor_1.5 reticulate_1.30 splines_4.2.2 uwot_0.1.14
[137] RcppRoll_0.3.0 spatstat.utils_3.0-3 sp_1.6-1 plotly_4.10.2
[141] sessioninfo_1.2.2 systemfonts_1.0.4 xtable_1.8-4 jsonlite_1.8.7
[145] R6_2.5.1 profvis_0.3.8 pillar_1.9.0 htmltools_0.5.5
[149] mime_0.12 nnls_1.4 glue_1.6.2 fastmap_1.1.1
[153] BiocParallel_1.32.6 codetools_0.2-19 pkgbuild_1.4.0 pcaPP_2.0-3
[157] mvtnorm_1.2-2 utf8_1.2.3 lattice_0.21-8 spatstat.sparse_3.0-1
[161] sva_3.46.0 curl_5.0.1 leiden_0.4.3 survival_3.5-5
[165] limma_3.54.2 munsell_0.5.0 GetoptLong_1.0.5 GenomeInfoDbData_1.2.9
[169] iterators_1.0.14 reshape2_1.4.4 gtable_0.3.3
Also I have the following versions of the "SCP", "Seurat" and "SeuratObject" packages installed:
> packageVersion("SCP")
[1] ‘0.4.7.9000’
> packageVersion("Seurat")
[1] ‘4.3.0’
> packageVersion("SeuratObject")
[1] ‘4.1.3’
Thank you in advance for any help!
Strange. In Seurat v4 or SeuratObject v4, there should not be a function called LayerData. This function is only exported in version 5. Therefore, please double-check if the version of Seurat in your environment is indeed v4.
https://github.com/satijalab/seurat/blob/727d26176d87c96c36ccd79d51219e66c9f0da37/NAMESPACE#L517C26-L517C35 https://github.com/mojaveazure/seurat-object/blob/89fe70b832602dd5dc4f846ccd086223a3129fa5/NAMESPACE#L36
I had the same problem, you can try upgrading matrix to 1.6.1.1 and seuratobject to version 5.0, hope this helps!
Same with this problem. When I installed SCP following the instructions, it installed seurat v5.0 by default. And then I just changed it to Seurat 4.4.0. Then I met the problem. But I think upgrading seuratobject to version 5.0 is not a good idea? Because most of the tools in SCP may be supported by Seurat 4 ? So is it possible to be forced to install Seurat 4?
@Streisenberg Hi, Have you solved this problem in other ways instead of changing seuratobject to version 5.0?
I also have this problem with seurat 4.4.0
I also have this problem with seurat 4.4.0