在Gviz plotTracks上绘制任意线条

时间:2014-08-25 20:47:04

标签: r plot bioconductor

我想在不同的AnnotationTrack绘制两个itens之间的线条,或者在Gviz绘图中的两个坐标之间绘制简单的线条。

genes data.frame:

   start      end
 72529373 72690449
 75457896 75536848
 76867833 76922959
 75664651 75870596
 76958977 77024110
 72065147 72204484
 74198711 74199129
 74816044 74978179
 76758753 76864805
 77032585 77176916
 73574461 73704802

library(Gviz) library(GenomicRanges) ideoTrack <- IdeogramTrack(genome = "bosTau6", chromosome = "chr12", fontsize=14, ucscChromosomeNames=TRUE) axisTrack <- GenomeAxisTrack(range = IRanges(start = c(71959908, 76756891), end = c(72409907, 77206892), names = rep("Neighborhood", 2)), fontsize=14, showId = TRUE, cex.id = 0.5, col.id = "black") aTgenes1 <- AnnotationTrack(genes, name = "Genes", genome ="bosTau6", chromosome ="chr12", showId = TRUE, stacking ="dense") aTgenes2 <- AnnotationTrack(genes, name = "Genes", genome ="bosTau6", chromosome ="chr12", showId = TRUE, stacking ="dense") plotTracks(list(ideoTrack, axisTrack, aTgenes1, aTgenes2), from = 71959908, to = 77206892, sizes=c(1,1,1,1), margin=40, littleTicks = TRUE)

上面的代码结果如下:

enter image description here

考虑到11个绘制的基因(第四个基因非常小且很难看到),我在基因之间有以下相互作用:

gene 1 -> gene 2 and gene 11 gene 3 -> gene 5 gene 7 -> gene 6

通过这种互动,我期待一些与此图相似的最终情节:

enter image description here

我曾尝试过一些适用于普通图但不适用于Gviz图的方法。一些想法?非常感谢你!

0 个答案:

没有答案