junjunlab / ClusterGVis

One-step to Cluster and Visualize Gene Expression Matrix
MIT License
231 stars 20 forks source link

getClusters报错、K-mean聚类用visCluster画线图出错 #98

Open EdmundFieldQIN opened 4 weeks ago

EdmundFieldQIN commented 4 weeks ago

matrix <- read.delim("盐胁迫.txt",row.names = 1,header = T) class(matrix)

[1] "data.frame"

矩阵

getClusters(exp = matrix) 错误于sequence.default(n..1, from = seq.int(s.1, length(df), s.1), : 'from' contains NAs 此外: 警告信息: In sequence.default(n..1, from = seq.int(s.1, length(df), s.1), : 强制到整数范围引入的 NA

ck <- clusterData(exp = matrix,
                    cluster.method = "kmeans",
                    cluster.num = 15)
visCluster(object = ck,
           plot.type = "line")

> visCluster(object = ck,

+ plot.type = "line")

Error in dplyr::arrange():

ℹ In argument: ..2 = .data[["membership"]].

Caused by error in .data[["membership"]]:

! Column membership not found in .data.

Run rlang::last_trace() to see where the error occurred.

请junjun大神解决一下,感谢

junjunlab commented 1 week ago

检查矩阵是否有NA,有的话替换成0

elegantmedstu commented 3 hours ago

https://github.com/cole-trapnell-lab/monocle-release/issues/518。目前似乎没有很好的解决办法,在我的数据中检查了没有NA值,但仍有报错。我的数据表格来自单细胞数据的AverageExpression,这是可能的原因