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

热图报错! #111

Open
CampingOnSeabed opened this issue Dec 7, 2024 · 5 comments
Open

热图报错! #111

CampingOnSeabed opened this issue Dec 7, 2024 · 5 comments

Comments

@CampingOnSeabed
Copy link

您好这是我的代码。
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!
然后热图没有任何变化,请大佬教一下

@junjunlab
Copy link
Owner

不太明白你要表达什么

@CampingOnSeabed
Copy link
Author

博主您好,就是我运行下面这段代码后,出现这个热图
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
麻烦您有空的时候解答一下吧,非常感谢!

@junjunlab
Copy link
Owner

把你的mat发我看看

@CampingOnSeabed
Copy link
Author

CampingOnSeabed commented Dec 11, 2024

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

@junjunlab
Copy link
Owner

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

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

2 participants