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

Constellation plots: calculating knn in reduced dimension space - pca or umap? #58

Open
carmensandoval opened this issue Aug 16, 2020 · 6 comments

Comments

@carmensandoval
Copy link

carmensandoval commented Aug 16, 2020

Hi scrattch.hicat team,

I've been trying make some constellation plots of my own using the code in your package.

In your methods section for the Yao 2020 preprint, you describe the process for making the constellation plots:

For each cell its 15 nearest neighbors in reduced dimension space were determined and summarized by cluster. For each cluster, we then calculated the fraction of nearest neighbors that were assigned to other clusters.

Does "reduced dimension space" here refer to PCA, or UMAP?
And if PCA - how many PCs did you use?

I understand that the cluster nodes are derived from the UMAP coordinates (centroids), but it's not clear from the explanation or the code if you are getting the knn table from PCA or UMAP coordinates. My hunch is that you use PCA for this, following the workflow used for clustering. Am I right about this?

Thanks a lot!
Carmen

@yzizhen
Copy link
Collaborator

yzizhen commented Feb 12, 2021

Yes, you are right that we refer to the PCA space, not UMAP. UMAP is only used for visualization. We used 50-60PCs, but it depends on the complicity of the dataset. Elbow test or other z-score based test can be used for decision.

@salwanbutrus
Copy link

Hey Carmen!

Did you end successfully generating a constellation plot? I have been having issues creating the correct input for the get_knn_graph() function and was wondering if you had any example csv files laying around. I posted a separate issue on this github, but figured I should ask here as well since this repository doesn't seem to be closely monitored.

Thanks,
Salwan

@chhatbarchintan
Copy link

@salwanbutrus did you solve the problem with regards to correct input for the get_knn_graph() function?

@salwanbutrus
Copy link

I did not. Have you?

@cvanvelt
Copy link
Member

This website is a work in progress but there is an example for plotting a constellation.

@chhatbarchintan
Copy link

@cvanvelt thanks a lot for sharing the link. I will try it out.

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

5 participants