quadbio / simspec

Calculation of Reference/Cluster Similarity Spectrum (RSS/CSS)
30 stars 3 forks source link

error with css_project #13

Open Paperplane1031 opened 6 months ago

Paperplane1031 commented 6 months ago

I have tried to figure out why this happen but failed when using css_project. when I run these codes below:

model <- cluster_sim_spectrum(object = embryos, label_tag = "sample_stage",
                                    cluster_resolution = 0.3,
                                    corr_method = "pearson",
                                    spectrum_type = "corr_kernel", return_seuratObj = F)
sample_CSS_blastoids <- css_project(sample_blastoids, model)

It returns

Error in h(simpleError(msg, call)) : 
  error in evaluating the argument 'x' in selecting a method for function 't': non-numeric argument to binary operator

this is the information:

> embryos
An object of class Seurat 
21854 features across 680 samples within 1 assay 
Active assay: RNA (21854 features, 3000 variable features)
 3 layers present: counts, data, scale.data
 4 dimensional reductions calculated: pca, umap, css, css_umap

> sample_blastoids
An object of class Seurat 
21854 features across 402 samples within 1 assay 
Active assay: RNA (21854 features, 3000 variable features)
 3 layers present: counts, data, scale.data
 2 dimensional reductions calculated: pca, umap

session info:

sessionInfo() R version 4.2.3 (2023-03-15) Platform: x86_64-pc-linux-gnu (64-bit) Running under: Ubuntu 20.04.5 LTS

Matrix products: default BLAS: /data2/R-4.2.3/lib/libRblas.so LAPACK: /data2/R-4.2.3/lib/libRlapack.so

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

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

other attached packages: [1] dplyr_1.1.4 ggplot2_3.5.0 Seurat_4.2.1
[4] SeuratObject_5.0.1.9007 sp_2.1-3 simspec_0.0.0.9000

loaded via a namespace (and not attached): [1] Rtsne_0.17 colorspace_2.1-0 deldir_2.0-4
[4] ellipsis_0.3.2 ggridges_0.5.6 fs_1.6.3
[7] rstudioapi_0.16.0 spatstat.data_3.0-4 farver_2.1.1
[10] leiden_0.4.3 listenv_0.9.1 remotes_2.5.0
[13] ggrepel_0.9.5 fansi_1.0.6 codetools_0.2-20
[16] splines_4.2.3 cachem_1.0.8 polyclip_1.10-6
[19] pkgload_1.3.3 spam_2.10-0 jsonlite_1.8.8
[22] ica_1.0-3 cluster_2.1.6 png_0.1-8
[25] uwot_0.1.16 shiny_1.7.5.1 sctransform_0.4.0
[28] spatstat.sparse_3.0-3 compiler_4.2.3 httr_1.4.7
[31] Matrix_1.6-5 fastmap_1.1.1 lazyeval_0.2.2
[34] cli_3.6.2 later_1.3.2 htmltools_0.5.8.1
[37] tools_4.2.3 igraph_2.0.3 dotCall64_1.1-1
[40] gtable_0.3.4 glue_1.7.0 RANN_2.6.1
[43] reshape2_1.4.4 Rcpp_1.0.12 scattermore_1.2
[46] vctrs_0.6.5 spatstat.explore_3.2-1 nlme_3.1-164
[49] progressr_0.14.0 lmtest_0.9-40 spatstat.random_3.1-5 [52] stringr_1.5.1 globals_0.16.3 mime_0.12
[55] miniUI_0.1.1.1 lifecycle_1.0.4 irlba_2.3.5.1
[58] devtools_2.4.5 goftest_1.2-3 future_1.33.2
[61] MASS_7.3-60.0.1 zoo_1.8-12 scales_1.3.0
[64] promises_1.3.0 spatstat.utils_3.0-4 parallel_4.2.3
[67] RColorBrewer_1.1-3 memoise_2.0.1 reticulate_1.35.0
[70] pbapply_1.7-2 gridExtra_2.3 stringi_1.8.3
[73] pkgbuild_1.4.3 rlang_1.1.3 pkgconfig_2.0.3
[76] matrixStats_1.2.0 lattice_0.22-6 ROCR_1.0-11
[79] purrr_1.0.2 tensor_1.5 labeling_0.4.3
[82] patchwork_1.2.0 htmlwidgets_1.6.2 cowplot_1.1.3
[85] tidyselect_1.2.1 parallelly_1.37.1 RcppAnnoy_0.0.22
[88] plyr_1.8.9 magrittr_2.0.3 R6_2.5.1
[91] profvis_0.3.8 generics_0.1.3 pillar_1.9.0
[94] withr_3.0.0 fitdistrplus_1.1-11 survival_3.5-8
[97] abind_1.4-5 tibble_3.2.1 future.apply_1.11.0
[100] KernSmooth_2.23-22 utf8_1.2.4 spatstat.geom_3.2-4
[103] plotly_4.10.2 urlchecker_1.0.1 usethis_2.2.2
[106] grid_4.2.3 data.table_1.15.4 digest_0.6.35
[109] xtable_1.8-4 tidyr_1.3.1 httpuv_1.6.12
[112] munsell_0.5.1 viridisLite_0.4.2 sessioninfo_1.2.2

Could anyone help me? Thank you very much.