zijianni / SpotClean

R package for decontaminating the spot swapping effect and recovering true expression in spatial transcriptomics data
20 stars 8 forks source link

Spotclean() stalls on testdata #29

Open KarolineHoller opened 5 months ago

KarolineHoller commented 5 months ago

Hi, I'm running Spotclean on the provided test data of adult mouse brain following the vignette. However, the function spotclean() produces a Warning and then stops running:

data(mbrain_raw)

spatial_dir <- system.file(file.path("extdata", "V1_Adult_Mouse_Brain_spatial"), package = "SpotClean")

mbrain_slide_info <- read10xSlide(tissue_csv_file=file.path(spatial_dir, "tissue_positions_list.csv"), tissue_img_file = file.path(spatial_dir, "tissue_lowres_image.png"), scale_factor_file = file.path(spatial_dir, "scalefactors_json.json"))

slide_obj <- createSlide(mbrain_raw, mbrain_slide_info) Filtered out 0 genes with average expressions below or equal to 0.1.

decont_obj <- spotclean(slide_obj, maxit=10, candidate_radius = 20) 2024-03-14 11:39:18.71935 Start. Warning: No layers found matching search pattern providedError in match.arg(arg = method, choices = names(x = methods)) : 'arg' should be one of

The warning actually stops with " 'arg' should be one of ".

sessionInfo() R version 4.3.2 (2023-10-31) Platform: aarch64-apple-darwin20 (64-bit) Running under: macOS Sonoma 14.4

Matrix products: default BLAS: /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libBLAS.dylib LAPACK: /Library/Frameworks/R.framework/Versions/4.3-arm64/Resources/lib/libRlapack.dylib; LAPACK version 3.11.0

locale: [1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8

time zone: Europe/Berlin tzcode source: internal

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

other attached packages: [1] sceasy_0.0.7 reticulate_1.35.0 SpotClean_1.4.0

loaded via a namespace (and not attached): [1] RColorBrewer_1.1-3 rstudioapi_0.15.0 jsonlite_1.8.8
[4] magrittr_2.0.3 magick_2.8.3 spatstat.utils_3.0-4
[7] farver_2.1.1 rmarkdown_2.26 zlibbioc_1.48.0
[10] vctrs_0.6.5 ROCR_1.0-11 spatstat.explore_3.2-6
[13] RCurl_1.98-1.14 bmp_0.3 S4Arrays_1.2.1
[16] htmltools_0.5.7 readbitmap_0.1.5 Rhdf5lib_1.24.2
[19] rhdf5_2.46.1 SparseArray_1.2.4 sctransform_0.4.1
[22] parallelly_1.37.1 KernSmooth_2.23-22 htmlwidgets_1.6.4
[25] ica_1.0-3 plyr_1.8.9 plotly_4.10.4
[28] zoo_1.8-12 igraph_2.0.2 mime_0.12
[31] lifecycle_1.0.4 pkgconfig_2.0.3 Matrix_1.6-5
[34] R6_2.5.1 fastmap_1.1.1 GenomeInfoDbData_1.2.11
[37] MatrixGenerics_1.14.0 fitdistrplus_1.1-11 future_1.33.1
[40] shiny_1.8.0 digest_0.6.34 colorspace_2.1-0
[43] patchwork_1.2.0 S4Vectors_0.40.2 Seurat_5.0.2
[46] tensor_1.5 RSpectra_0.16-1 irlba_2.3.5.1
[49] GenomicRanges_1.54.1 labeling_0.4.3 progressr_0.14.0
[52] fansi_1.0.6 spatstat.sparse_3.0-3 httr_1.4.7
[55] polyclip_1.10-6 abind_1.4-5 compiler_4.3.2
[58] withr_3.0.0 tiff_0.1-12 viridis_0.6.5
[61] fastDummies_1.7.3 MASS_7.3-60.0.1 DelayedArray_0.28.0
[64] rjson_0.2.21 tools_4.3.2 lmtest_0.9-40
[67] httpuv_1.6.14 future.apply_1.11.1 goftest_1.2-3
[70] glue_1.7.0 rhdf5filters_1.14.1 nlme_3.1-164
[73] promises_1.2.1 grid_4.3.2 Rtsne_0.17
[76] cluster_2.1.6 reshape2_1.4.4 generics_0.1.3
[79] gtable_0.3.4 spatstat.data_3.0-4 tidyr_1.3.1
[82] data.table_1.15.2 sp_2.1-3 utf8_1.2.4
[85] XVector_0.42.0 BiocGenerics_0.48.1 spatstat.geom_3.2-9
[88] RcppAnnoy_0.0.22 ggrepel_0.9.5 RANN_2.6.1
[91] pillar_1.9.0 stringr_1.5.1 spam_2.10-0
[94] RcppHNSW_0.6.0 later_1.3.2 splines_4.3.2
[97] dplyr_1.1.4 lattice_0.22-5 survival_3.5-8
[100] deldir_2.0-4 tidyselect_1.2.0 SingleCellExperiment_1.24.0 [103] miniUI_0.1.1.1 pbapply_1.7-2 knitr_1.45
[106] gridExtra_2.3 IRanges_2.36.0 SummarizedExperiment_1.32.0 [109] scattermore_1.2 stats4_4.3.2 xfun_0.42
[112] Biobase_2.62.0 matrixStats_1.2.0 stringi_1.8.3
[115] lazyeval_0.2.2 yaml_2.3.8 evaluate_0.23
[118] codetools_0.2-19 tibble_3.2.1 cli_3.6.2
[121] uwot_0.1.16 xtable_1.8-4 munsell_0.5.0
[124] Rcpp_1.0.12 GenomeInfoDb_1.38.7 globals_0.16.3
[127] spatstat.random_3.2-3 png_0.1-8 parallel_4.3.2
[130] ellipsis_0.3.2 ggplot2_3.5.0 dotCall64_1.1-1
[133] jpeg_0.1-10 bitops_1.0-7 listenv_0.9.1
[136] SpatialExperiment_1.12.0 viridisLite_0.4.2 scales_1.3.0
[139] ggridges_0.5.6 crayon_1.5.2 SeuratObject_5.0.1
[142] leiden_0.4.3.1 purrr_1.0.2 rlang_1.1.3
[145] cowplot_1.1.3

Happy to hear your opinions on that. Thanks!

zijianni commented 5 months ago

Hi @KarolineHoller , there was a major release on Seurat which caused some incompatibility with older SpotClean versions. Please update the SpotClean pacakge to 1.4.1 and try again.

KarolineHoller commented 5 months ago

Hi @zijianni, thanks for your reply. I updated Spotclean to 1.4.1 through Bioconductor, but I still bet the same error. Using the SpotClean version of this github repo (1.5.2), I also get that error.

sessionInfo() R version 4.3.2 (2023-10-31) Platform: aarch64-apple-darwin20 (64-bit) Running under: macOS Sonoma 14.4

Matrix products: default BLAS: /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libBLAS.dylib LAPACK: /Library/Frameworks/R.framework/Versions/4.3-arm64/Resources/lib/libRlapack.dylib; LAPACK version 3.11.0

locale: [1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8

time zone: Europe/Berlin tzcode source: internal

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

other attached packages: [1] sceasy_0.0.7 reticulate_1.35.0 SpotClean_1.4.1

loaded via a namespace (and not attached): [1] RcppAnnoy_0.0.22 splines_4.3.2 later_1.3.2 bitops_1.0-7
[5] tibble_3.2.1 polyclip_1.10-6 fastDummies_1.7.3 lifecycle_1.0.4
[9] processx_3.8.3 globals_0.16.3 lattice_0.22-5 MASS_7.3-60.0.1
[13] readbitmap_0.1.5 magrittr_2.0.3 plotly_4.10.4 rmarkdown_2.26
[17] remotes_2.4.2.1 yaml_2.3.8 httpuv_1.6.14 Seurat_5.0.3
[21] sctransform_0.4.1 spam_2.10-0 sessioninfo_1.2.2 sp_2.1-3
[25] pkgbuild_1.4.3 spatstat.sparse_3.0-3 cowplot_1.1.3 pbapply_1.7-2
[29] RColorBrewer_1.1-3 abind_1.4-5 pkgload_1.3.4 zlibbioc_1.48.0
[33] Rtsne_0.17 GenomicRanges_1.54.1 purrr_1.0.2 BiocGenerics_0.48.1
[37] RCurl_1.98-1.14 GenomeInfoDbData_1.2.11 IRanges_2.36.0 S4Vectors_0.40.2
[41] ggrepel_0.9.5 irlba_2.3.5.1 listenv_0.9.1 spatstat.utils_3.0-4
[45] goftest_1.2-3 RSpectra_0.16-1 spatstat.random_3.2-3 fitdistrplus_1.1-11
[49] parallelly_1.37.1 leiden_0.4.3.1 codetools_0.2-19 DelayedArray_0.28.0
[53] tidyselect_1.2.0 farver_2.1.1 viridis_0.6.5 matrixStats_1.2.0
[57] stats4_4.3.2 spatstat.explore_3.2-6 jsonlite_1.8.8 ellipsis_0.3.2
[61] progressr_0.14.0 bmp_0.3 ggridges_0.5.6 survival_3.5-8
[65] tools_4.3.2 ica_1.0-3 Rcpp_1.0.12 glue_1.7.0
[69] gridExtra_2.3 SparseArray_1.2.4 xfun_0.42 usethis_2.2.3
[73] MatrixGenerics_1.14.0 GenomeInfoDb_1.38.7 dplyr_1.1.4 withr_3.0.0
[77] BiocManager_1.30.22 fastmap_1.1.1 rhdf5filters_1.14.1 fansi_1.0.6
[81] callr_3.7.5 digest_0.6.34 R6_2.5.1 mime_0.12
[85] colorspace_2.1-0 scattermore_1.2 tensor_1.5 jpeg_0.1-10
[89] spatstat.data_3.0-4 utf8_1.2.4 tidyr_1.3.1 generics_0.1.3
[93] data.table_1.15.2 httr_1.4.7 htmlwidgets_1.6.4 S4Arrays_1.2.1
[97] uwot_0.1.16 pkgconfig_2.0.3 gtable_0.3.4 lmtest_0.9-40
[101] SingleCellExperiment_1.24.0 XVector_0.42.0 htmltools_0.5.7 profvis_0.3.8
[105] dotCall64_1.1-1 SeuratObject_5.0.1 scales_1.3.0 Biobase_2.62.0
[109] png_0.1-8 SpatialExperiment_1.12.0 knitr_1.45 rstudioapi_0.15.0
[113] reshape2_1.4.4 rjson_0.2.21 curl_5.2.1 nlme_3.1-164
[117] zoo_1.8-12 cachem_1.0.8 rhdf5_2.46.1 stringr_1.5.1
[121] KernSmooth_2.23-22 parallel_4.3.2 miniUI_0.1.1.1 desc_1.4.3
[125] pillar_1.9.0 grid_4.3.2 vctrs_0.6.5 RANN_2.6.1
[129] urlchecker_1.0.1 promises_1.2.1 xtable_1.8-4 cluster_2.1.6
[133] evaluate_0.23 magick_2.8.3 cli_3.6.2 compiler_4.3.2
[137] rlang_1.1.3 crayon_1.5.2 future.apply_1.11.1 labeling_0.4.3
[141] ps_1.7.6 plyr_1.8.9 fs_1.6.3 stringi_1.8.3
[145] viridisLite_0.4.2 deldir_2.0-4 munsell_0.5.0 lazyeval_0.2.2
[149] tiff_0.1-12 devtools_2.4.5 spatstat.geom_3.2-9 Matrix_1.6-5
[153] RcppHNSW_0.6.0 patchwork_1.2.0 future_1.33.1 ggplot2_3.5.0
[157] Rhdf5lib_1.24.2 shiny_1.8.0 SummarizedExperiment_1.32.0 ROCR_1.0-11
[161] igraph_2.0.2 memoise_2.0.1