-
Notifications
You must be signed in to change notification settings - Fork 2
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
error in test_association #7
Comments
Hi, thank you for your interest in scFates! This kind of error usually happens when there are less cells than degrees of freedom (default is 5) in a given branch. I would go back to the learned tree and check and remove any spurious branches if there are any. scf.tl.cleanup can help in such case, otherwise changing the initial tree parameters. Hope that helps |
I understand now the issue and is linked to the fact of using elpigraph and my last breaking change concerning how pseudotime is calculated: Before, cells were randomly assigned a probability of position between its node and the closest one. I was not happy with such approach because pseudotime value would vary between runs (of course solvable with a seed, but this wont reflect the true position of the cell on the tree) I have now changed the approach to a fully deterministic one, meaning that the actual values from the assignment matrix R are used for assigning cells to nodes. I realize now this becomes an issue when using elpigraph, which has a specific form of hard assignment R matrix, where value can only be 1 for the closest node and 0 for the rest, hence all cells being assigned the pseudotime value of their closest node. Trees generated with simpleppt don't have this issue since cells are assigned a value between 0 and 1 (soft assignment R matrix) towards all nodes of the tree. I will think of another way of assigning pseudotime in elpigraph situation, most likely by projecting cells to their closest edge, in the mean time I would suggest you to either rerun the tree learning using simpleppt, or by converting your existing hard assignment R matrix into a soft assignment one using |
I have now released version 0.9.0, which solves the pseudotime issue for elpigraph! I have also included a explore_sigma function which should help choosing the right one. I have made a tutorial about its usage here. In your case it is possible that the sigma is too high, leading to a collpase of the points, but it is true that elpigraph can more reliably construct trees without too much tweaking, that is why we have included it in scFates! Concerning the plotting issues, except for the last one which I can fix quickly, it is hard to figure out what is wrong, maybe the best would that you send me an anonymized save of your anndata object so I can have a closer look into it! |
I am closing this issue by letting you know that I have released version v0.9.1, where I changed the pseudotime calculation method to the one used by elpigraph itself, as it leads to better pseudotime ordering of cells (somehow my approach still was generating gaps and was collapsing cells towards principal points). For the plotting issues feel free to open a new issue! |
hi scFates developer,
Thank you for creating this useful tool. I used it to compute the principle tree of my data and it worked wonderful.
But when I tried to test the gene association with the tree via
scf.tl.test_association
, I got the following errorI wonder what do you think could be the problem? and which parameter should I change or how should I filter the data to fix this?
thx
The text was updated successfully, but these errors were encountered: