abelson-lab / scATOMIC

Pan-Cancer Single Cell Classifier
MIT License
57 stars 5 forks source link

cell_predictions problem #8

Closed Cryconnor closed 1 year ago

Cryconnor commented 1 year ago

When I perform cell_predictions,the following error occurs: sparse_matrix<- combined@assays$RNA@counts cell_predictions<-run_scATOMIC(sparse_matrix) [1] "Starting Layer 1" /p300s/biosoft/app/python/python3.9/lib/python3.9/site-packages/magic/magic.py:425: UserWarning: Input matrix contains unexpressed genes. Please remove them prior to running MAGIC. warnings.warn( Error: 'em' is not an exported object from 'namespace:cutoff'

I don't really understand why, and I would appreciate it if you could answer it.

inofechm commented 1 year ago

Hello, I believe you are missing a dependency and using the older version of scATOMIC. The dependency you need for scATOMIC v2 can be installed with devtools::install_github("inofechm/cutoff.scATOMIC", force = T) Please ensure you are using scATOMIC v2, if not please update scATOMIC with devtools::install_github("abelson-lab/scATOMIC")'

Please update scATOMIC and install cutoff.scATOMIC, restart R session and then let me know if this resolved the issue.

In v1 of scATOMIC this was the cutoff package, however since there was a different package in CRAN called cutoff we have changed this to cutoff.scATOMIC in v2.

Cryconnor commented 1 year ago

Hi, Thanks for your answer, but I installed it strictly according to the tutorial code: devtools::install_version("dlm", version = "1.1.5", repos = "http://cran.us.r-project.org") devtools::install_version("Rmagic", version = "2.0.3", repos = "http://cran.us.r-project.org") devtools::install_github("inofechm/cutoff.scATOMIC", force = T) devtools::install_github("abelson-lab/scATOMIC")

But the problem still exists, looking forward to your reply, thanks!

inofechm commented 1 year ago

can you please post your sessionInfo()?

Cryconnor commented 1 year ago

Hi, Here is my sessionInfo()

R version 4.2.2 (2022-10-31) Platform: x86_64-conda-linux-gnu (64-bit) Running under: CentOS Linux 7 (Core)

Matrix products: default BLAS/LAPACK: /p300s/biosoft/app/python/python3.9/envs/R4.2.2/lib/libopenblasp-r0.3.21.so

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

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

loaded via a namespace (and not attached): [1] compiler_4.2.2 tools_4.2.2

Thanks!

inofechm commented 1 year ago

Hi again, It seems like none of the libraries have been loaded. Please run: library(scATOMIC) library(plyr) library(dplyr) library(data.table) library(randomForest) library(caret) library(parallel) library(reticulate) library(Rmagic) library(Matrix) library(Seurat) library(agrmt) library(cutoff.scATOMIC) library(copykat) library(ggplot2) before running any of the code if you still have issues please give me the sessionInfo after loading the libraries

Cryconnor commented 1 year ago

Sorry, Here is sessionInfo() after loading the libraries: R version 4.2.2 (2022-10-31) Platform: x86_64-conda-linux-gnu (64-bit) Running under: CentOS Linux 7 (Core)

Matrix products: default BLAS/LAPACK: /p300s/biosoft/app/python/python3.9/envs/R4.2.2/lib/libopenblasp-r0.3.21.so

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

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

other attached packages: [1] copykat_1.1.0 cutoff.scATOMIC_0.1.0 agrmt_1.42.8 [4] SeuratObject_4.1.3 Seurat_4.3.0 Rmagic_2.0.3 [7] Matrix_1.5-3 reticulate_1.25 caret_6.0-94 [10] lattice_0.20-45 ggplot2_3.4.1 randomForest_4.7-1.1 [13] data.table_1.14.2 dplyr_1.1.2 plyr_1.8.7 [16] scATOMIC_1.1.4

loaded via a namespace (and not attached): [1] Rtsne_0.16 colorspace_2.0-3 deldir_1.0-6 [4] ellipsis_0.3.2 class_7.3-21 ggridges_0.5.4 [7] rprojroot_2.0.3 spatstat.data_3.0-1 leiden_0.4.3 [10] listenv_0.9.0 ggrepel_0.9.1 prodlim_2023.03.31 [13] fansi_1.0.4 lubridate_1.9.2 codetools_0.2-18 [16] splines_4.2.2 polyclip_1.10-0 jsonlite_1.8.4 [19] pROC_1.18.0 ica_1.0-3 cluster_2.1.4 [22] png_0.1-7 uwot_0.1.14 spatstat.sparse_3.0-1 [25] shiny_1.7.4 sctransform_0.3.5 compiler_4.2.2 [28] httr_1.4.4 fastmap_1.1.0 lazyeval_0.2.2 [31] cli_3.6.0 later_1.3.0 htmltools_0.5.4 [34] tools_4.2.2 igraph_1.3.1 gtable_0.3.0 [37] glue_1.6.2 RANN_2.6.1 reshape2_1.4.4 [40] rappdirs_0.3.3 Rcpp_1.0.10 scattermore_0.8 [43] vctrs_0.6.2 spatstat.explore_3.0-6 nlme_3.1-157 [46] progressr_0.13.0 iterators_1.0.14 lmtest_0.9-40 [49] spatstat.random_3.1-4 timeDate_4022.108 gower_1.0.1 [52] stringr_1.5.0 globals_0.16.2 timechange_0.2.0 [55] mime_0.12 miniUI_0.1.1.1 lifecycle_1.0.3 [58] irlba_2.3.5.1 goftest_1.2-3 future_1.32.0 [61] MASS_7.3-57 zoo_1.8-11 scales_1.2.0 [64] ipred_0.9-14 spatstat.utils_3.0-2 promises_1.2.0.1 [67] RColorBrewer_1.1-3 gridExtra_2.3 pbapply_1.7-0 [70] rpart_4.1.19 stringi_1.7.12 foreach_1.5.2 [73] hardhat_1.3.0 lava_1.7.2.1 rlang_1.1.0 [76] pkgconfig_2.0.3 matrixStats_0.62.0 tensor_1.5 [79] ROCR_1.0-11 purrr_1.0.1 recipes_1.0.6 [82] patchwork_1.1.1 htmlwidgets_1.6.1 cowplot_1.1.1 [85] tidyselect_1.2.0 here_1.0.1 parallelly_1.34.0 [88] RcppAnnoy_0.0.20 magrittr_2.0.3 R6_2.5.1 [91] generics_0.1.2 pillar_1.9.0 withr_2.5.0 [94] fitdistrplus_1.1-8 abind_1.4-5 survival_3.3-1 [97] sp_1.6-0 nnet_7.3-18 tibble_3.2.1 [100] future.apply_1.10.0 KernSmooth_2.23-20 utf8_1.2.3 [103] spatstat.geom_3.1-0 plotly_4.10.1 grid_4.2.2 [106] ModelMetrics_1.2.2.2 digest_0.6.31 xtable_1.8-4 [109] tidyr_1.2.0 httpuv_1.6.8 stats4_4.2.2 [112] munsell_0.5.0 viridisLite_0.4.0

Thanks for your patience and guidance!

inofechm commented 1 year ago

Your issue is that your scATOMIC version is 1.1.4 but you need version 2.0.0

Please uninstall scATOMIC using: remove.packages('scATOMIC')

and then re-install it with devtools::install_github("abelson-lab/scATOMIC")

alternatively you can use the old version of scATOMIC and install the cutoff package with devtools::install_github("choisy/cutoff") and run library(cutoff) but I recommend just updating scATOMIC to v2

Cryconnor commented 1 year ago

Hi, Problem solved!!! Thank you very much, your work is truly exceptional!