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

获取聚类getClusters报错 #116

Open
yuan1027bio opened this issue Feb 9, 2025 · 1 comment
Open

获取聚类getClusters报错 #116

yuan1027bio opened this issue Feb 9, 2025 · 1 comment

Comments

@yuan1027bio
Copy link

在更新完新的安装包之后,在获取聚类数就报错:
library(ClusterGVis)

protein <- read.delim('Brain_DEP_Mean_Shrinkage.txt', row.names = 1, check.names = FALSE)
protein_matrix <- as.matrix(protein)
getClusters(exp =protein_matrix)
错误于factoextra::fviz_nbclust(exp, stats::kmeans, method = "wss"):
x should be an object of class matrix/data.frame or an object created by the function NbClust() [NbClust package].

看到友友建议后,删除“exp=”后,运行示例数据data(exps)是可以运行的,但是运行我自己的数据后,出现新的报错:
library(ClusterGVis)

protein <- read.delim('Brain_DEP_Mean_Shrinkage.txt', row.names = 1, check.names = FALSE)
protein_matrix <- as.matrix(protein)
getClusters(protein_matrix)
错误于if (cls == "cell_data_set") {: the condition has length > 1
class(protein_matrix)

考虑到更新的安装包的数据格式可能也更新了,但是没有明白应该调整为什么样的格式呢

@yuan1027bio
Copy link
Author

已经解决了,是本身数据的格式问题

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

1 participant