get.cell.meta.data: Get the meta data of a cell

View source: R/global.R

get.cell.meta.dataR 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.index

The name (index) for the sector

sector.numeric.index

Numeric index for the sector

track.index

Numeric index for the track

xlim

Minimal and maximal values on the x-axis

ylim

Minimal and maximal values on the y-axis

xrange

Range of xlim. It equals to xlim[2] - xlim[1]

yrange

Range of ylim

xcenter

Center of x-axis. It equals to (xlim[2] + xlim[1])/2

ycenter

Center of y-axis

cell.xlim

Minimal and maximal values on the x-axis extended by cell paddings

cell.ylim

Minimal and maximal values on the y-axis extended by cell paddings

xplot

Degrees 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).

yplot

Radius for top and bottom borders of the cell.

cell.width

Width of the cell, in degrees.

cell.height

Height of the cell, simply yplot[2] - yplot[1]

cell.start.degree

Same as xplot[1]

cell.end.degree

Same as xplot[2]

cell.bottom.radius

Same as yplot[1]

cell.top.radius

Same as yplot[2]

track.margin

Margin for the cell

cell.padding

Padding 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()

circlize documentation built on May 29, 2024, 1:59 a.m.