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

Cannot plot clusters #16

Open
HCY558 opened this issue Jun 13, 2023 · 1 comment
Open

Cannot plot clusters #16

HCY558 opened this issue Jun 13, 2023 · 1 comment

Comments

@HCY558
Copy link

HCY558 commented Jun 13, 2023

Hello,
I was wondering if you can help me with the following error? Thank you!

I am using the BigPint pipeline on my own RNAseq data. Everything works up until this point, I can create the parallel coordinate plots just fine, but then when I try to create clusters I get this error. I am using R 4.3.0 and Rstudio 2023.03.1

#set number of clusters and plot each
ret <- plotClusters(data, dataMetrics, threshVal = 0.05, nC = 4,
colList = c("#00A600FF", "#CC00FFFF"), lineSize = 0.5, verbose = TRUE)

Error in xtfrm.data.frame(x) : cannot xtfrm data frames

@lindsayrutter
Copy link
Owner

Hello:

Yes, I can try to help you solve that error.

One comment: You set nC (number of clusters) to a value of 4. However, you only provided 2 colors to your colList (color list). If your script were to work, then it would create four subplots (one for each of your 4 clusters), but only 2 of them would display colored lines (the other 2 would just be blank canvas). So, be sure to keep nC and colList equal in value. When you then draw your clustered plot (with the grid.draw function), be sure to use that same value in the naming scheme. Below are two examples:

2-cluster example:

ret <- plotClusters(data, dataMetrics, threshVal = 0.05, nC = 2, colList = c("#00A600FF", "#CC00FFFF"), lineSize = 0.5, verbose = TRUE)

grid.draw(ret[["N_P_2"]]) # value is 2

4-cluster example:

ret <- plotClusters(data, dataMetrics, threshVal = 0.05, nC = 4, colList = c("#00A600FF", "#CC00FFFF", "#0066FF", "#CC00FF"), lineSize = 0.5, verbose = TRUE)

grid.draw(ret[["N_P_4"]]) # value is 4

I am currently unsure about the error. So, to troubleshoot that, could you kindly paste what you get when you type:

str(data)
str(dataMetrics)

That might help me pinpoint the problem! Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants