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

Using different latent space and knn for milo analysis #48

Open
revolvefire opened this issue Aug 14, 2024 · 2 comments
Open

Using different latent space and knn for milo analysis #48

revolvefire opened this issue Aug 14, 2024 · 2 comments

Comments

@revolvefire
Copy link

Thanks for the wonderful tool!

I was wondering whether it would be okay to perform MILO analysis based on a different latent space and KNN than those used for building the initial UMAP and clusters.

For example, using X_scVI for the analysis, and then using PCA and a new KNN for MILO analysis.

When tested on a couple of samples, it seems that X_scVI-based MILO may be slighly so too conservative when used on identical sample types with two different conditions, especially when the sample size is only 20~30K, whereas batch-corrected weighted PC-based KNN seems to work slightly better (it does not compress the data too much in terms of spatial FDR).

On one hand, I feel like this approach is acceptable, but on the other hand, I have some doubts.

@emdann
Copy link
Owner

emdann commented Aug 22, 2024

Hi @revolvefire, this is entirely up to the user and to what you think makes most sense for the dataset you are analysing. I personally find that using the same KNN graph for multiple analyses helps for coherent interpretation.

The best way to safeguard your analysis from false positives coming from imperfect dimensionality reduction is to include confounders (i.e. labels that you use for batch correction) in the DA testing model, either as samples (columns of the count matrix) or as additional factors in the linear model.

@revolvefire
Copy link
Author

Thank you for the detailed reply!

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