Gviz中的注释轨迹

时间:2013-04-01 17:33:45

标签: r plot ggplot2 bioconductor

有使用bioconductor软件包的经验的任何人:Gviz是否知道如何直接在AnnotationTrack上添加DataTrack

例如,在ggplot2中,我可以使用+ geom_text添加到一个prexitsting图中,但我无法找到Gviz的类似功能

谢谢!

1 个答案:

答案 0 :(得分:0)

虽然它不是您想要的,但一种可能的解决方案是添加一个涵盖您感兴趣区域的:host(.transition) { transition: background-position .5s ease-in; } :host(.bg-position0) { background-position: 0 0%; } :host(.bg-position-negative) { background-position: 0 -100%; } 。虽然这不会明确标注/添加关键元素到HighlightTrack,但它有助于突出显示不同DataTrack之间的对齐方式。

示例:

DataTracks

图形输出

enter image description here

虽然library(Gviz) library(GenomicRanges) data(geneModels) data(cpgIslands) gen <- genome(cpgIslands) chr <- 1 start <- 120005434 end <- 129695434 itrack <- IdeogramTrack(genome = gen, chromosome = chr) gtrack <- GenomeAxisTrack() grtrack <- GeneRegionTrack(geneModels, genome = gen, chromosome = chr, name = "foo") htrack <- HighlightTrack(trackList = list(gtrack, grtrack), start = 121535434, end = 124535434, chromosome = chr) plotTracks(list(itrack, htrack), from = start, to = end) 为空,但它会演示grtrack将如何跨越指定的HighlightTrack(在这种情况下为DataTracksgrtrack)。< / p>

有关详细信息,请参阅GViz documentation