satijalab / seurat

R toolkit for single cell genomics
http://www.satijalab.org/seurat
Other
2.27k stars 910 forks source link

error about IntegrateLayers() function using Harmony #7827

Closed pandaqiuqiu closed 3 months ago

pandaqiuqiu commented 1 year ago
When I run IntegrateLayers using the Harmony method on Seurat 5, I encounter the following error, and it appears that the issue is related to the harmony::HarmonyMatrix() function. > sce <- SCTransform(sce) #In this step there is no error sce <- IntegrateLayers(sce, method = HarmonyIntegration, + orig.reduction = "pca", new.reduction = "harmony", #"integrated.cca" + assay = "SCT", verbose = FALSE) Error in if ((ncores != as.integer(ncores)) || (ncores < 1) || (ncores > : missing value where TRUE/FALSE needed In addition: Warning message: HarmonyMatrix is deprecated and will be removed in the future from the API in the future

R version 4.1.0 (2021-05-18) Platform: x86_64-apple-darwin17.0 (64-bit) Running under: macOS Big Sur 11.5.2

Matrix products: default LAPACK: /Library/Frameworks/R.framework/Versions/4.1/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] stats graphics grDevices utils datasets methods base

other attached packages: [1] Seurat_4.9.9.9060 dplyr_1.1.3 SeuratObject_4.9.9.9091 sp_2.0-0

loaded via a namespace (and not attached): [1] Rtsne_0.16 colorspace_2.1-0 deldir_1.0-9 ellipsis_0.3.2 ggridges_0.5.4
[6] rprojroot_2.0.3 fs_1.6.3 RcppHNSW_0.4.1 rstudioapi_0.15.0 spatstat.data_3.0-1
[11] leiden_0.4.3 listenv_0.9.0 remotes_2.4.2.1 ggrepel_0.9.3 RSpectra_0.16-1
[16] fansi_1.0.4 codetools_0.2-19 splines_4.1.0 cachem_1.0.8 pkgload_1.3.2.1
[21] polyclip_1.10-4 spam_2.9-1 jsonlite_1.8.7 RhpcBLASctl_0.23-42 ica_1.0-3
[26] cluster_2.1.4 png_0.1-8 uwot_0.1.16 shiny_1.7.5 sctransform_0.4.0
[31] spatstat.sparse_3.0-2 compiler_4.1.0 httr_1.4.7 Matrix_1.6-1.1 fastmap_1.1.1
[36] lazyeval_0.2.2 cli_3.6.1 later_1.3.1 prettyunits_1.1.1 htmltools_0.5.6
[41] tools_4.1.0 igraph_1.5.1 dotCall64_1.0-2 gtable_0.3.4 glue_1.6.2
[46] RANN_2.6.1 reshape2_1.4.4 Rcpp_1.0.11 scattermore_1.2 vctrs_0.6.3
[51] spatstat.explore_3.2-3 nlme_3.1-163 progressr_0.14.0 lmtest_0.9-40 spatstat.random_3.1-6 [56] stringr_1.5.0 ps_1.7.5 globals_0.16.2 mime_0.12 miniUI_0.1.1.1
[61] lifecycle_1.0.3 irlba_2.3.5.1 devtools_2.4.5 goftest_1.2-3 future_1.33.0
[66] MASS_7.3-60 zoo_1.8-12 scales_1.2.1 promises_1.2.1 spatstat.utils_3.0-3
[71] parallel_4.1.0 RColorBrewer_1.1-3 curl_5.0.0 memoise_2.0.1 reticulate_1.32.0
[76] pbapply_1.7-2 gridExtra_2.3 ggplot2_3.4.3 stringi_1.7.12 desc_1.4.2
[81] fastDummies_1.7.3 harmony_1.0.1 pkgbuild_1.4.2 rlang_1.1.1 pkgconfig_2.0.3
[86] matrixStats_1.0.0 lattice_0.21-8 ROCR_1.0-11 purrr_1.0.2 tensor_1.5
[91] patchwork_1.1.3 htmlwidgets_1.6.2 processx_3.8.2 cowplot_1.1.1 tidyselect_1.2.0
[96] parallelly_1.36.0 RcppAnnoy_0.0.21 plyr_1.8.8 magrittr_2.0.3 R6_2.5.1
[101] profvis_0.3.8 generics_0.1.3 pillar_1.9.0 fitdistrplus_1.1-11 survival_3.5-7
[106] abind_1.4-5 tibble_3.2.1 future.apply_1.11.0 crayon_1.5.2 KernSmooth_2.23-22
[111] utf8_1.2.3 spatstat.geom_3.2-5 plotly_4.10.2 urlchecker_1.0.1 usethis_2.2.2
[116] grid_4.1.0 data.table_1.14.8 callr_3.7.3 digest_0.6.33 xtable_1.8-4
[121] tidyr_1.3.0 httpuv_1.6.11 munsell_0.5.0 viridisLite_0.4.2 sessioninfo_1.2.2

# insert reproducible example here
swbioinf commented 1 year ago

Posting to mention I am getting the same error also.

mhkowalski commented 3 months ago

Hi,

I believe this issue is outdated and I'm going to close it, but please re-open if you're experiencing a problem with using harmony with the latest version of seurat.

BenjaminDEMAILLE commented 1 month ago

same thing :

Warning in harmony::HarmonyMatrix(data_mat = Embeddings(object = orig), : HarmonyMatrix is deprecated and will be removed in the future from the API in the future Warning: Warning: The parameters do_pca and npcs are deprecated. They will be ignored for this function call and please remove parameters do_pca and npcs and pass to harmony cell_embeddings directly. This warning is displayed once per session. Warning: Warning: The parameter tau is deprecated. It will be ignored for this function call and please remove parameter tau in future function calls. Advanced users can set value of parameter tau by using parameter .options and function harmony_options(). This warning is displayed once per session. Warning: Warning: The parameter block.size is deprecated. It will be ignored for this function call and please remove parameter block.size in future function calls. Advanced users can set value of parameter block.size by using parameter .options and function harmony_options(). This warning is displayed once per session. Warning: Warning: The parameter max.iter.harmony is replaced with parameter max_iter. It will be ignored for this function call and please use parameter max_iter in future function calls. This warning is displayed once per session. Warning: Warning: The parameter max.iter.cluster is deprecated. It will be ignored for this function call and please remove parameter max.iter.cluster in future function calls. Advanced users can set value of parameter max.iter.cluster by using parameter .options and function harmony_options(). This warning is displayed once per session. Warning: Warning: The parameter epsilon.cluster is deprecated. It will be ignored for this function call and please remove parameter epsilon.cluster in future function calls. Advanced users can set value of parameter epsilon.cluster by using parameter .options and function harmony_options(). This warning is displayed once per session. Warning: Warning: The parameter epsilon.harmony is deprecated. It will be ignored for this function call and please remove parameter epsilon.harmony in future function calls. If users want to control if harmony would stop early or not, use parameter early_stop. Advanced users can set value of parameter epsilon.harmony by using parameter .options and function harmony_options(). This warning is displayed once per session.