Lotfollahi-lab / nichecompass

End-to-end analysis of spatial multi-omics data
https://nichecompass.readthedocs.io/
BSD 3-Clause "New" or "Revised" License
35 stars 6 forks source link

_compute_connectivities_umap #70

Closed mossishahi closed 3 months ago

mossishahi commented 3 months ago

This line of compute_knn_graph_connectivities_and_distances method produces this error with scanpy version 1.10.0:

    238 distances[new_row_idx, new_col_idx] = (distances[new_row_idx, new_col_idx] +
    239                                        np.nextafter(0, 1, dtype=np.float32))
--> 241 sp_distances, sp_conns = sc.neighbors._compute_connectivities_umap(
    242         indices[:, :n_neighbors],
    243         distances[:, :n_neighbors],
    244         adata.n_obs,
    245         n_neighbors=n_neighbors)
    246 adata.obsp[f"{knng_key}_connectivities"] = sp_conns
    247 adata.obsp[f"{knng_key}_distances"] = sp_distances

AttributeError: module 'scanpy.neighbors' has no attribute '_compute_connectivities_umap'

This makes compute_clisis method to fail.

sebastianbirk commented 3 months ago

Hi @mossishahi, This issue is related to the update of scanpy to version 1.10.0. We have modified the dependencies so that scanpy has to be <1.10.0. Thanks for pointing this out.