File: get.cell.meta.data.Rd

package info (click to toggle)
r-cran-circlize 0.4.16%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 3,560 kB
  • sloc: makefile: 8
file content (85 lines) | stat: -rw-r--r-- 2,509 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
\name{get.cell.meta.data}
\alias{get.cell.meta.data}
\title{
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{

  \item{name}{Only support one name at a time, see "details" section
}
  \item{sector.index}{Index of the sector
}
  \item{track.index}{Index of the track
}

}
\details{
The following meta information for a cell can be obtained:

\describe{
  \item{\code{sector.index}}{The name (index) for the sector
}
  \item{\code{sector.numeric.index}}{Numeric index for the sector
}
  \item{\code{track.index}}{Numeric index for the track
}
  \item{\code{xlim}}{Minimal and maximal values on the x-axis
}
  \item{\code{ylim}}{Minimal and maximal values on the y-axis
}
  \item{\code{xrange}}{Range of \code{xlim}. It equals to \code{xlim[2] - xlim[1]}
}
  \item{\code{yrange}}{Range of \code{ylim}
}
  \item{\code{xcenter}}{Center of x-axis. It equals to \code{(xlim[2] + xlim[1])/2}
}
  \item{\code{ycenter}}{Center of y-axis
}
  \item{\code{cell.xlim}}{Minimal and maximal values on the x-axis extended by cell paddings
}
  \item{\code{cell.ylim}}{Minimal and maximal values on the y-axis extended by cell paddings
}
  \item{\code{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).
}
  \item{\code{yplot}}{Radius for top and bottom borders of the cell.
}
  \item{\code{cell.width}}{Width of the cell, in degrees.
}
  \item{\code{cell.height}}{Height of the cell, simply \code{yplot[2] - yplot[1]}
}
  \item{\code{cell.start.degree}}{Same as \code{xplot[1]}
}
  \item{\code{cell.end.degree}}{Same as \code{xplot[2]}
}
  \item{\code{cell.bottom.radius}}{Same as \code{yplot[1]}
}
  \item{\code{cell.top.radius}}{Same as \code{yplot[2]}
}
  \item{\code{track.margin}}{Margin for the cell
}
  \item{\code{cell.padding}}{Padding for the cell
}
}

The function is useful when using \code{panel.fun} in \code{\link{circos.track}} to
get detailed information of the current cell.
}
\seealso{
\code{\link{CELL_META}} is a short version of \code{\link{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()
}