
Draw text in a cell, specifically for genomic graphics
circos.genomicText(region, value = NULL, y = NULL, labels = NULL, labels.column = NULL,
numeric.column = NULL, sector.index = get.cell.meta.data("sector.index"),
track.index = get.cell.meta.data("track.index"), posTransform = NULL,
direction = NULL, facing = "inside", niceFacing = FALSE,
adj = par("adj"), cex = 1, col = "black", font = par("font"), padding = 0,
extend = 0, ...)
A data frame contains 2 column which correspond to start position and end position
A data frame contains values and other information
A vector or a single value indicating position of text.
Labels of text corresponding to each genomic positions
If labels are in value
, index of column in value
Which column in value
data frame should be taken as y-value.
If it is not defined, only the first numeric columns in value
will be taken.
Pass to circos.rect
Pass to circos.rect
Self-defined function to transform genomic positions, see posTransform.default
for explanation
Passing to circos.text
. Settings are similar as col
Should the facing of text be adjusted to fit human eyes?
Deprecated, use facing
instead.
Pass to circos.text
. Settings are similar as col
Pass to circos.text
. Settings are similar as col
Pass to circos.text
. The length of col
can be either one or number of rows of region
.
Pass to circos.text
. Settings are similar as col
pass to posTransform
if it is set as posTransform.text
pass to posTransform
if it is set as posTransform.text
Mysterious parameters
The function is a low-level graphical function and usually is put in panel.fun
when using circos.genomicTrackPlotRegion
.
Gu, Z. (2014) circlize implements and enhances circular visualization in R. Bioinformatics.
# NOT RUN {
circos.par("track.height" = 0.1, cell.padding = c(0, 0, 0, 0))
circos.initializeWithIdeogram(plotType = NULL)
bed = generateRandomBed(nr = 20)
circos.genomicTrackPlotRegion(bed, ylim = c(0, 1), panel.fun = function(region, value, ...) {
circos.genomicText(region, value, y = 0.5, labels = "text", ...)
})
bed = cbind(bed, sample(letters, nrow(bed), replace = TRUE))
circos.genomicTrackPlotRegion(bed, panel.fun = function(region, value, ...) {
circos.genomicText(region, value, labels.column = 2, ...)
})
circos.clear()
# }
# NOT RUN {
# }
Run the code above in your browser using DataLab