Hi, thanks for showing the wonderful analyzing pipeline. When following your code in "Module1_MP.R", I was confused by a wierd error. After running "jac_matord = scalop::hca_reorder(jac_mat)", I saw "Error in if (class(x) == "marix") { : the condition has length > 1". I realized that this error was caused by multiple class of the "jac_mat" from "jac_mat = scalop::Jaccard(genes_list)":
class(jac_mat)
[1] "matrix" "array"
I am not sure whether this was caused by unmatched versions between "scalop" and other packages. Also, no clues was found when checking scalop issues (The "scalop" package was installed by BiocManager::install("jpmam1/scalop"), because we failed to install it by "install_github("jlaffy/scalop")"). By changing "if (class(x) == "marix") {" to "if (class(x)[1] == "marix") {" in the ".hca" function, I finally made this run, but an empty "clusters" was obtained then by:
Hi, thanks for showing the wonderful analyzing pipeline. When following your code in "Module1_MP.R", I was confused by a wierd error. After running "jac_matord = scalop::hca_reorder(jac_mat)", I saw "Error in if (class(x) == "marix") { : the condition has length > 1". I realized that this error was caused by multiple class of the "jac_mat" from "jac_mat = scalop::Jaccard(genes_list)":
I am not sure whether this was caused by unmatched versions between "scalop" and other packages. Also, no clues was found when checking scalop issues (The "scalop" package was installed by BiocManager::install("jpmam1/scalop"), because we failed to install it by "install_github("jlaffy/scalop")"). By changing "if (class(x) == "marix") {" to "if (class(x)[1] == "marix") {" in the ".hca" function, I finally made this run, but an empty "clusters" was obtained then by:
clusters <- altered_hca_groups(jac_matord, cor.method="none", k=mp_num, min.size=4, max.size=0.5)
Could you please help me figure this out? Thanks!
[1] /home/liangxs/R/x86_64-pc-linux-gnu-library/4.2 [2] /home/liangxs/R/x86_64-pc-linux-gnu-library/4.3 [3] /usr/local/lib/R/site-library [4] /usr/lib/R/site-library [5] /usr/lib/R/library
V ── Loaded and on-disk version mismatch. P ── Loaded and on-disk path mismatch.
─ Python configuration ─────────────────────────────────────────────────────────────────────────────── python: /home/liangxs/mambaforge/envs/Jupyter_p/bin/python libpython: /home/liangxs/mambaforge/envs/Jupyter_p/lib/libpython3.9.so pythonhome: /home/liangxs/mambaforge/envs/Jupyter_p:/home/liangxs/mambaforge/envs/Jupyter_p version: 3.9.19 | packaged by conda-forge | (main, Mar 20 2024, 12:50:21) [GCC 12.3.0] numpy: /home/liangxs/mambaforge/envs/Jupyter_p/lib/python3.9/site-packages/numpy numpy_version: 1.26.4 pandas: /home/liangxs/mambaforge/envs/Jupyter_p/lib/python3.9/site-packages/pandas
NOTE: Python version was forced by RETICULATE_PYTHON