crj32 / M3C

Monte Carlo Reference-based Consensus Clustering
https://bioconductor.org/packages/release/bioc/html/M3C.html
36 stars 15 forks source link

r$assignments #1

Closed mnhuda closed 4 years ago

mnhuda commented 5 years ago

Hello, I was going through your tutorial on the R bloggers (https://www-r--bloggers-com.cdn.ampproject.org/v/s/www.r-bloggers.com/running-umap-for-data-visualisation-in-r/amp/?amp_js_v=0.1#referrer=https%3A%2F%2Fwww.google.com&amp_tf=From%20%251%24s&ampshare=https%3A%2F%2Fwww.r-bloggers.com%2Frunning-umap-for-data-visualisation-in-r%2F) For the following point, I got an error message.

r <- M3C(pollen$data,method=2) umap(pollen$data,labels=as.factor(r$assignments),printres = TRUE,printwidth = 24)

It seems that the “r$assignments” does not exist. Can you please hwithp on this?

crj32 commented 5 years ago

Try with the data loaded with M3C automatically. This is the 'mydata' object, this code works for me:

Package M3C version 1.7.993 Index

library(M3C) r <- M3C(mydata,method=2) M3C method: penalised stability clustering algorithm: pam annotation: none running consensus cluster algorithm for real data... done. optimal K: 5 r$assignments [1] 1 2 3 1 4 4 1 3 5 3 5 2 2 1 4 4 3 2 3 2 1 5 5 3 1 2 5 1 1 5 4 1 1 5 4 4 3 1 5 4 5 5 3 2 3 3 3 [48] 5 2 4 umap(mydata,labels=r$assignments) UMAP wrapper function running... done.