-
Notifications
You must be signed in to change notification settings - Fork 104
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
scv.tl.paga #1241
Comments
Hello, I met the same problem. o(╥﹏╥)o |
after screening the codes, i find that the problem arised from function: it works if you modify the codes from: 😃 |
I install scipy==1.11.4 to avoid the self._check() error, and solve this problem. |
I am having the same problem. Installing scipy==1.11.4 got rid of this problem but I got another error instead when running scv.tl.paga: |
it worked!~~~ thx~ |
Hi team, I used the example data to run the scv.tl.page step and encounts the following error. I guess it's the imcompelity with paga.compute_transitions() funtion?
many thanks
...
File ~/anaconda3/envs/localpy/lib/python3.9/site-packages/scvelo/tools/paga.py:288, in paga(adata, groups, vkey, use_time_prior, root_key, end_key, threshold_root_end_prior, minimum_spanning_tree, copy)
285 adata.uns["paga"]["connectivities_tree"] = paga.connectivities_tree
286 adata.uns[f"{groups}_sizes"] = np.array(paga.ns)
--> 288 paga.compute_transitions()
289 adata.uns["paga"]["transitions_confidence"] = paga.transitions_confidence
290 adata.uns["paga"]["threshold"] = paga.threshold
File ~/anaconda3/envs/localpy/lib/python3.9/site-packages/scvelo/tools/paga.py:142, in PAGA_tree.compute_transitions(self)
140 vc = igraph.VertexClustering(g, membership=membership)
141 cg_full = vc.cluster_graph(combine_edges="sum")
--> 142 transitions = get_sparse_from_igraph(cg_full, weight_attr="weight")
143 transitions = transitions - transitions.T
144 transitions_conf = transitions.copy()
File ~/anaconda3/envs/localpy/lib/python3.9/site-packages/scvelo/tools/paga.py:51, in get_sparse_from_igraph(graph, weight_attr)
49 shape = (shape, shape)
50 if len(edges) > 0:
---> 51 return csr_matrix((weights, zip(*edges)), shape=shape)
52 else:
53 return csr_matrix(shape)
File ~/anaconda3/envs/localpy/lib/python3.9/site-packages/scipy/sparse/_compressed.py:55, in _cs_matrix.init(self, arg1, shape, dtype, copy)
52 else:
53 if len(arg1) == 2:
54 # (data, ij) format
---> 55 coo = self._coo_container(arg1, shape=shape, dtype=dtype)
56 arrays = coo._coo_to_compressed(self._swap)
57 self.indptr, self.indices, self.data, self._shape = arrays
File ~/anaconda3/envs/localpy/lib/python3.9/site-packages/scipy/sparse/_coo.py:99, in _coo_base.init(self, arg1, shape, dtype, copy)
96 if dtype is not None:
97 self.data = self.data.astype(dtype, copy=False)
---> 99 self._check()
File ~/anaconda3/envs/localpy/lib/python3.9/site-packages/scipy/sparse/_coo.py:188, in _coo_base._check(self)
186 """ Checks data structure for consistency """
187 if self.ndim != len(self.coords):
--> 188 raise ValueError('mismatching number of index arrays for shape; '
189 f'got {len(self.coords)}, expected {self.ndim}')
191 # index arrays should have integer data types
192 for i, idx in enumerate(self.coords):
ValueError: mismatching number of index arrays for shape; got 0, expected 2
Error output
Versions
The text was updated successfully, but these errors were encountered: