| get.cell.meta.data {circlize} | R Documentation |
Get the meta data of a cell
Description
Get the meta data of a cell
Usage
get.cell.meta.data(name, sector.index = get.current.sector.index(),
track.index = get.current.track.index())
Arguments
name |
Only support one name at a time, see "details" section |
sector.index |
Index of the sector |
track.index |
Index of the track |
Details
The following meta information for a cell can be obtained:
sector.indexThe name (index) for the sector
sector.numeric.indexNumeric index for the sector
track.indexNumeric index for the track
xlimMinimal and maximal values on the x-axis
ylimMinimal and maximal values on the y-axis
xrangeRange of
xlim. It equals toxlim[2] - xlim[1]yrangeRange of
ylimxcenterCenter of x-axis. It equals to
(xlim[2] + xlim[1])/2ycenterCenter of y-axis
cell.xlimMinimal and maximal values on the x-axis extended by cell paddings
cell.ylimMinimal and maximal values on the y-axis extended by cell paddings
xplotDegrees for right and left borders of the cell. The values ignore the direction of the circular layout (i.e. whether it is clock wise or not).
yplotRadius for top and bottom borders of the cell.
cell.widthWidth of the cell, in degrees.
cell.heightHeight of the cell, simply
yplot[2] - yplot[1]cell.start.degreeSame as
xplot[1]cell.end.degreeSame as
xplot[2]cell.bottom.radiusSame as
yplot[1]cell.top.radiusSame as
yplot[2]track.marginMargin for the cell
cell.paddingPadding for the cell
The function is useful when using panel.fun in circos.track to
get detailed information of the current cell.
See Also
CELL_META is a short version of get.cell.meta.data.
Examples
sectors = letters[1:4]
circos.initialize(sectors, xlim = c(0, 1))
circos.trackPlotRegion(ylim = c(0, 1), panel.fun = function(x, y) {
print(get.cell.meta.data("xlim"))
})
print(get.cell.meta.data("xlim", sector.index = "a", track.index = 1))
circos.clear()