You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
File ~/anaconda3/lib/python3.10/site-packages/palantir/presults.py:555, in select_branch_cells(ad, pseudo_time_key, fate_prob_key, q, eps, masks_key, save_as_df)
552 n = fate_probs.shape[0]
554 step = n // PSEUDOTIME_RES
--> 555 nsteps = n // step
556 for i in range(nsteps):
557 l, r = i * step, (i + 1) * step
ZeroDivisionError: integer division or modulo by zero
The text was updated successfully, but these errors were encountered:
Thank you for reporting. My guess is that your dataset has a very small number of cells (<500). The best solution would be to increase the number of cells in tour dataset, as results for such a small sample size might vary. As a quick fix to make this work for the given dataset you can run
palantir.presults.PSEUDOTIME_RES=ad.n_obs
before running the selection. I also made a patch that should avoid this error in the future. You can install the patched version now with
masks = palantir.presults.select_branch_cells(adata, eps=0)
plt.show()
ZeroDivisionError Traceback (most recent call last)
Cell In[545], line 1
----> 1 masks = palantir.presults.select_branch_cells(adata, eps=0)
2 plt.show()
File ~/anaconda3/lib/python3.10/site-packages/palantir/presults.py:555, in select_branch_cells(ad, pseudo_time_key, fate_prob_key, q, eps, masks_key, save_as_df)
552 n = fate_probs.shape[0]
554 step = n // PSEUDOTIME_RES
--> 555 nsteps = n // step
556 for i in range(nsteps):
557 l, r = i * step, (i + 1) * step
ZeroDivisionError: integer division or modulo by zero
The text was updated successfully, but these errors were encountered: