sqjin / CellChat

R toolkit for inference, visualization and analysis of cell-cell communication from single-cell data
GNU General Public License v3.0
637 stars 145 forks source link

Error in functional similarity analysis #357

Open csijcs opened 2 years ago

csijcs commented 2 years ago

Really great tool! I'm having issues with one step of the analysis though: cellchat <- netEmbedding(cellchat, type = "functional")

Gives the following warning:

Manifold learning of the signaling networks for datasets 1 2
/home/j.siefert/.local/share/r-miniconda/envs/r-reticulate/lib/python3.6/site-packages/umap/umap_.py:126: UserWarning: A few of your vertices were disconnected from the manifold.  This shouldn't cause problems.
Disconnection_distance = 1 has removed 32994 edges.
It has only fully disconnected 1 vertices.
Use umap.utils.disconnected_vertices() to identify them.
  f"A few of your vertices were disconnected from the manifold.  This shouldn't cause problems.\n"

And then when I run: cellchat <- netClustering(cellchat, type = "functional")

I get the following error: Error in do_one(nmeth) : NA/NaN/Inf in foreign function call (arg 1)

Any idea how this can be corrected?

sqjin commented 2 years ago

@csijcs It appears that there are bugs when running on your data. If you can share me the object, I can take a closer look.

csijcs commented 2 years ago

Thanks very much for your response. Here is a link to the data: https://drive.google.com/file/d/1rJUeKaFJbrsc8Jk5oXNWuwYULqlZo5Xi/view?usp=sharing It's currently restricted, but once you request access I will add you.

sqjin commented 2 years ago

@csijcs Can you try the solution in #259

csijcs commented 2 years ago

That does not solve the problem for me. My rownames are set correctly.

I did discover that the problem only occurs with umap.method = "umap-learn" and not with umap.method = "uwot"