KrishnaswamyLab / phateR

PHATE dimensionality reduction method implemented in R
GNU General Public License v2.0
77 stars 9 forks source link

phateR for clustering #27

Closed indajuan closed 5 years ago

indajuan commented 5 years ago

Hello,

I am interesting in using Phate for clustering. Is there any implementation in the package?

Is there a way to choose the dimension for the mds embedding? 2, 3 or 10 for the clustering.

Thank you and kind regards,

scottgigante commented 5 years ago

Hi @indajuan ,

I've added a function into the codebase to do this for you. We run kmeans on the PHATE diffusion potential, which is actually much more efficient than running it on high dimensional MDS.

I'll merge the new functionality onto master this afternoon, after which you can test it out by upgrading with devtools::install_github("KrishnaswamyLab/phateR") and pip install --upgrade --user phate.

The cluster function will be on CRAN next release.

scottgigante commented 5 years ago

Forgot to mention: you can run the clustering function with

library(phateR)
phate_out <- phate(...)
clusters <- cluster_phate(phate_out, k=8)
plot(phate_out, col=clusters)
indajuan commented 5 years ago

Thank you!