crj32 / M3C

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

Plotting usning M3C #2

Closed zillurbmb51 closed 4 years ago

zillurbmb51 commented 4 years ago

Hello, I was trying to tsne plot for some dataframe and getting this: > tsne(mds1[,4:7],labels=pop_code) Error in tsne(mds1[, 4:7], labels = pop_code) : unused argument (labels = pop_code If I run it without labels argument, it works fine. Any help? Also How can I use tsne for my plink bed files? Best, Zillur

crj32 commented 4 years ago

You might want to try the newest version directly from github not bioconductor. This does work for me, what is pop_code?:

> library(M3C)
> tsne(mydata,labels=desx$class)
***t-SNE wrapper function***
running...
done.
Warning message:
In tsne(mydata, labels = desx$class) :
  there is NA values in the labels vector, setting to unknown
zillurbmb51 commented 4 years ago

Thank you very much. pop_code is a vector that contains labels (population name) for each data point. `> library(M3C)

head(pop_code) [1] "GBR" "GBR" "GBR" "GBR" "GBR" "GBR" tsne(mds1[,4:7],labels=pop_code) Error in tsne(mds1[, 4:7], labels = pop_code) : unused argument (labels = pop_code) mds1$pop=pop_code tsne(mds1[,4:7],labels=mds1$pop) Error in tsne(mds1[, 4:7], labels = mds1$pop) : unused argument (labels = mds1$pop)`

crj32 commented 4 years ago

Please use devtools::install_github(crj32/M3C), then try again with new version then try with test data and try to see differences from there. Not sure about the plink question.

zillurbmb51 commented 4 years ago

Thank you very much. After installing the latest as you described above, I am getting this: `> library(M3C)

tsne(mds1[,4:7],labels=pop_code) Error: lazy-load database '/home/zillur/R/x86_64-redhat-linux-gnu-library/3.6/M3C/R/M3C.rdb' is corrupt In addition: Warning message: internal error -3 in R_decompress1 plot(tsne(mds1[,4:7],labels=pop_code)) Error in plot(tsne(mds1[, 4:7], labels = pop_code)) : lazy-load database '/home/zillur/R/x86_64-redhat-linux-gnu-library/3.6/M3C/R/M3C.rdb' is corrupt In addition: Warning messages: 1: In plot(tsne(mds1[, 4:7], labels = pop_code)) : restarting interrupted promise evaluation 2: In plot(tsne(mds1[, 4:7], labels = pop_code)) : internal error -3 in R_decompress1` Any help? Best, Zillur

crj32 commented 4 years ago

Can you restart RStudio and try again for me, with, tsne(mydata,labels=desx$class)? Then, I'll have to wait for all the versions to go through the bioconductor then debug once I see any errors.

zillurbmb51 commented 4 years ago

Thank you. I closed and than open rstudio again and getting this: `> library(M3C)

tsne(mydata,labels=desx$class) Error: lazy-load database '/home/zillur/R/x86_64-redhat-linux-gnu-library/3.6/M3C/R/M3C.rdb' is corrupt In addition: Warning messages: 1: restarting interrupted promise evaluation 2: internal error -3 in R_decompress1 `

crj32 commented 4 years ago

Duno

crj32 commented 4 years ago

So I think this is your build. Have you tried upgrading R if possible. I tried on my ubuntu machine this morning with no issues.

library(M3C)
tsne(mydata,labels=desx$class)
***t-SNE wrapper function***
running...
done.
Warning message:
In tsne(mydata, labels = desx$class) :
  there is NA values in the labels vector, setting to unknown

On R version 3.6.1 (2019-07-05)

zillurbmb51 commented 4 years ago

Thank you. After update it is resolved.