ClusterGVis icon indicating copy to clipboard operation
ClusterGVis copied to clipboard

热图报错!

Open CampingOnSeabed opened this issue 1 year ago • 6 comments

您好这是我的代码。 monocle3_genes <- rownames(cds_gene[,c(5,2,3,4,1,6)] %>% filter(q_value < 1e-3 & morans_I >0.19) ) mat <- pre_pseudotime_matrix(cds_obj = cds, gene_list = monocle3_genes) head(mat[1:5,1:5]) #getClusters(exp = mat)

ck <- clusterData(exp = mat, cluster.method = "kmeans", cluster.num = 3)

add line annotation

markergenes <- c("SOX2","NES","ASCL1","VIM","PAX3","PAX6","PAX7", "GSX1","GSX2","PAX2","PAX8","LBX1","LHX1","LHX5", "TLX3","POU4F1","DRGX") pdf('monocle3.pdf',height = 6,width = 8,onefile = F) p <- visCluster(object = ck, cluster.order = c(1,3,2), plot.type = "both", add.sampleanno = F, markGenes = markergenes, show_row_dend = F) p p <-visCluster(object = ck, plot.type = "both", add.sampleanno = F, markGenes = markergenes) p #改变row顺序 p1 <- p p1@ht_list[["Z-score"]]@row_order_list[["C1"]] <- rev(c(1:392)) p1@ht_list[["Z-score"]]@row_order_list[["C3"]] <- rev(c(657:776)) p1@ht_list[["Z-score"]]@row_order_list[["C2"]] <- rev(c(393:656)) pdf('monocle3-1.pdf',height = 6,width = 8,onefile = F) p1 dev.off()

这步运行完正常产生一个热图 ck <- clusterData(exp = mat, cluster.method = "kmeans", cluster.num = 3) 再往下运行就会说 This palatte have 20 colors! 然后热图没有任何变化,请大佬教一下

CampingOnSeabed avatar Dec 07 '24 13:12 CampingOnSeabed

不太明白你要表达什么

junjunlab avatar Dec 11 '24 02:12 junjunlab

博主您好,就是我运行下面这段代码后,出现这个热图 ck <- clusterData(exp = mat,
cluster.method = "kmeans", cluster.num = 3) 1 然后接着运行 markergenes <- c("SOX2","NES","ASCL1","VIM","PAX3","PAX6","PAX7", "GSX1","GSX2","PAX2","PAX8","LBX1","LHX1","LHX5", "TLX3","POU4F1","DRGX") p <- visCluster(object = ck, cluster.order = c(1,3,2), plot.type = "both", add.sampleanno = F, markGenes = markergenes, show_row_dend = F) 会报出This palatte have 20 colors! 然后会产生 Snipaste_2024-12-11_11-26-42 但是理想情况应该是这样的 2 麻烦您有空的时候解答一下吧,非常感谢!

CampingOnSeabed avatar Dec 11 '24 03:12 CampingOnSeabed

把你的mat发我看看

junjunlab avatar Dec 11 '24 03:12 junjunlab

把你的mat发我看看 你好,非常感谢。但是我的mat.csv有156MB,github发不上来。。。。 请问方便发到您的邮箱嘛

CampingOnSeabed avatar Dec 11 '24 03:12 CampingOnSeabed

pdf函数保存再打开就没问题了。

junjunlab avatar Jan 22 '25 06:01 junjunlab

我也是出现了这个问题

zmx13531902995 avatar Feb 07 '25 08:02 zmx13531902995