LouisFaure / scFates

a scalable python suite for tree inference and advanced pseudotime analysis from scRNAseq data.
https://scfates.readthedocs.io/
BSD 3-Clause "New" or "Revised" License
47 stars 1 forks source link

scf.tl.pseudotime:ValueError: probabilities do not sum to 1 #9

Closed annrosebright closed 4 months ago

annrosebright commented 1 year ago

Hi,

Thanks for generating such a great tool. I am trying to use scFates for our single-cell RNAseq datasets. I am following the "Tree analysis - Bone marrow fates" notebook. For this analysis, I am using adata I had already processed using scanpy. While performing the pseudo time calculation I get the following error. I am not able to figure out the issue. I checked if its because of the version of NumPy, but I have the exact version needed by scfates. Can it be because I am using an adata already processed by scanpy? I have attached a screenshot of the error plus I have uploaded the HTML file of the whole notebook.

Please let me know if I can provide any more information. Thanks in advance.

Screenshot 2022-11-24 at 17 36 10

S2_trajectory analysis.pdf

LouisFaure commented 1 year ago

It is looking like that some cells do not have their probability assignment to principal node summing to 1. Could you check this before running scf.tl.pseudotime:

np.allclose(adata.obsm["X_R"].sum(axis=1),1)

if this shows False, then it is the case.

Additionally, try running scf.tl.pseudotime without multiple mapping (n_map=1) and see if you have a similar error.