我想用R中的circlize包把几个基因融合可视化成一个圆圈。
我的数据是
fusion1 <- data.frame("chr" = c("chr7", "chr1", "chr12", "chr3", "chr16", "chr7", "chr12", "chr1"),
"start" = c(27934839, 92327028, 24366277, 64430159, 85391249, 27934839, 67462830, 741179),
"end" = c(28934839, 93327028, 25366277, 65430159, 86391249, 28934839, 68462830, 1741179))
fusion2 <- data.frame("chr" = c("chr17", "chr1", "chr12", "chr3", "chr16", "chr17", "chr12", "chr7"),
"start" = c(30267305, 92456741, 24048958, 64184643, 85667520, 30274636, 66990707, 55863785),
"end" = c(31267305,93456741, 25048958, 65184643, 86667520, 31274636, 67990707, 56863785))
我的密码是
library(circlize)
circos.initializeWithIdeogram()
circos.genomicLink(fusion1, fusion2, col = "red", border = NA)
circos.clear()
但我运行了代码,得到了一个错误:
Error in region1[i, 2] == region1[i, 3] :
comparison of these types is not implemented
这就是我所期望发生的
1条答案
按热度按时间rqqzpn5f1#
当我运行你的代码时,没有任何错误,请确保你有一个干净的环境,并确保你的列有如下相同的类型:
创建于2023年3月4日,使用reprex v2.0.2