Skip to content
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

latent time opposite to velocity direction #114

Closed
constantAmateur opened this issue Nov 25, 2019 · 2 comments
Closed

latent time opposite to velocity direction #114

constantAmateur opened this issue Nov 25, 2019 · 2 comments

Comments

@constantAmateur
Copy link

Running scVelo with the dynamic model on a data-set where we know how the cells should be ordered yields very good results in terms of the velocity vectors.

scvelo_direction

Our strong expectation is that the biological process should proceed from bottom left up top right. However, when we infer latent time, the ordering seems to be reversed.

scvelo_latent_time

I'm guessing this is because there is a group of what looks like "root cells" on the left of the blob at the top. Is it possible to tell scVelo to ignore these cells when calculating latent time? Can miss-assignment of the root cells produce this kind of inversion?

I've looked at the documentation for recover_latent_time and there is a root_key parameter but I can't work out how to use it to specify which cells to use/not use.

@VolkerBergen
Copy link
Contributor

VolkerBergen commented Nov 26, 2019

The reversion indeed comes from falsely assigned root cells, which also gave me quite some headache as this hampers robustness. In particular for smaller cell numbers, this sometimes happens as also 'isolated' cells are classified as root cells since there is no outgoing flow.

We will work out a more robust way of confidently assigning root cells soon. For now, you can either store a root cell in adata.uns['iroot'] and use root_key='iroot', or you can constrain the adata.obs['root_cells'] to the bottom cells.

@constantAmateur
Copy link
Author

Thank you, it's good to understand what caused this. Changing the root as you described worked and the ordering now looks like I expected it to.

scvelo_new_root

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants