tracks(ggbio)
tracks()所属R语言包:ggbio
Tracks for genomic graphics
基因组图形的轨道
译者:生物统计家园网 机器人LoveR
描述----------Description----------
In most genome browsers, they all have such a view that including many tracks, could be any anntation data along genomic coordinate. So we try to provide a convenient constructor for building tracks, which here in this package is simply vertically binding of several plots. It's essentially a grid.arrange. So if users want to have more delicate control over their tracks, they need manipulate the graphics in
在大多数的基因组浏览器,他们有这样的看法,其中包括许多曲目,可能是沿着基因坐标的任何anntation数据。因此,我们尝试提供一个方便的构造建设的轨道,在这个包仅仅是几个图垂直约束力。它本质上是一个grid.arrange。因此,如果用户希望有他们的踪迹,更细腻的控制,他们需要处理的图形
用法----------Usage----------
show.ticks = FALSE,
show.title = TRUE,
legend = FALSE, xlim, ylim)
参数----------Arguments----------
参数:...
Plots of class ggplot2, trellis, or grobs, and valid arguments to grid.layout.
类ggplot2,棚架,或grobs,有效参数的图谋grid.layout。
参数:show.axis.text.y
logical value indicate to show y axis text or not.
逻辑值,表明显示Y轴的文字或没有。
参数:show.ticks
logical value indicate to show ticks or not.
逻辑值,表明显示刻度与否。
参数:show.title
logical value indicate to show title of tracks or not.
逻辑值显示曲目或不显示标题。
参数:legend
Default is FALSE, remove legend, this make sure all tracks are aligned exactly based on the same position.
默认为false,删除的传说,这确保所有曲目是完全一致的基础上相同的位置。
参数:xlim
Limits on x.
X上的限制。
参数:ylim
Limits on y.
对y的限制。
Details
详情----------Details----------
tracks function has some extra features and limitations compare to grid.arrange.
tracks功能有一些额外的功能和局限性比较grid.arrange。
Always sitting on genomic or protein space.
总是坐在基因或蛋白质空间。
Always using ncol = 1 as default arguments.
始终使用默认参数NCOL = 1。
For now, since the unbalanced legend and labels in ggplot2 has been solved (maybe just I haven't found such features). We simply remove legend and y axis labels to make sure all tracks are aligned exactly in the same way.
现在,因为不平衡的传说和在ggplot2标签已得到解决(也许只是我还没有发现这样的功能)。我们只需删除传说和y轴的标签,以确保所有的曲目都以同样的方式完全一致。
Remove the x-axis for most track except the last one.
删除除最后一个x轴为最轨道。
Does the ajustment of margins for you automatically.
是否为你的利润率自动大庆石油管理局。
Doesn't like qplot, tracks doesn't return ggplot object. so processing your plot before you pass them to tracks.
不喜欢qplot,轨道不回ggplot对象。这样处理的图,然后再通过他们tracks。
Tracks cannot guarantee all trakcs are aligned well in all the cases sinmly because control of grobs sometimes are tricky and based on what users passed. Like theme change, or uneven labels or legend could affact the alignemnts. Eventhough I tried hard to align them in most cases.
曲目不能保证所有trakcs是一致的,因为在所有情况下sinmly控制的grobs有时是棘手,对用户通过基于。像主题的变化,或不平衡的标签或图例,可以affact的alignemnts。尽管我努力,他们在大多数情况下,对齐。
When y axis text length are not equal across tracks, it's hard to align. So you will see small wiggles. Even missing y label would affect the accurate alignmetns too.
当y轴的文本长度不轨道之间的平等,就很难对齐。所以你会看到小晃。甚至失踪Ÿ标签影响准确alignmetns,,太。
So by default, we remove y axis text and legend to make sure they are aligned exactly at the same position. Clearly this is not a good practice.
因此,默认情况下,我们删除Y轴的文字和传说,以确保他们在同一位置完全一致。显然,这是不是一个好的做法。
We will try our best to fix this restriction in the future release. So advanced users could use gridExtra package to modify the graphics before passing to grid.arrange.
我们将尽力解决此限制,在未来的版本。因此,高级用户可以使用gridExtra包修改传递grid.arrange之前的图形。
值----------Value----------
return a frame grob; side-effect (plotting) if plot=T.
返回一帧GROB;副作用(策划)如果图= T
作者(S)----------Author(s)----------
Tengfei Yin
参见----------See Also----------
grid.arrange
grid.arrange
举例----------Examples----------
## Not run: [#无法运行:]
library(BSgenome.Hsapiens.UCSC.hg19)
gr <- GRanges("chr1", IRanges(5e7, 5e7+50))
p1 <- qplot(Hsapiens, name = gr, geom = "text")
p2 <- qplot(Hsapiens, name = gr, geom = "point")
p3 <- qplot(Hsapiens, name = gr, geom = "segment")
p4 <- qplot(Hsapiens, name = gr, geom = "rectangle")
tracks(p1, p2, p3, p4)
## End(Not run)[#结束(不运行)]
转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。
注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
|