Description Usage Arguments Details References Examples
Add points to a plotting region, specifically for genomic graphics
1 2 3 4 | circos.genomicPoints(region, value, numeric.column = NULL,
sector.index = get.cell.meta.data("sector.index"),
track.index = get.cell.meta.data("track.index"), posTransform = NULL,
pch = par("pch"), col = par("col"), cex = par("cex"), bg = par("bg"), ...)
|
region |
A data frame contains 2 columns which correspond to start positions and end positions |
value |
A data frame contains values and other information |
numeric.column |
Which column in |
sector.index |
Pass to |
track.index |
Pass to |
posTransform |
Self-defined function to transform genomic positions, see |
col |
color of points. If there is only one numeric column, the length of |
pch |
Type of points. Settings are similar as |
cex |
Size of points. Settings are similar as |
bg |
background colors for points. |
... |
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.
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 | ## Not run:
circos.par("track.height" = 0.1)
circos.initializeWithIdeogram(plotType = NULL)
bed = generateRandomBed(nr = 100)
circos.genomicTrackPlotRegion(bed, panel.fun = function(region, value, ...) {
circos.genomicPoints(region, value, pch = 16, cex = 0.5, ...)
})
circos.genomicTrackPlotRegion(bed, stack = TRUE, panel.fun = function(region, value, ...) {
circos.genomicPoints(region, value, pch = 16, cex = 0.5, ...)
i = getI(...)
cell.xlim = get.cell.meta.data("cell.xlim")
circos.lines(cell.xlim, c(i, i), lty = 2, col = "#00000040")
})
bed1 = generateRandomBed(nr = 100)
bed2 = generateRandomBed(nr = 100)
bed_list = list(bed1, bed2)
# data frame list
circos.genomicTrackPlotRegion(bed_list, panel.fun = function(region, value, ...) {
cex = (value[[1]] - min(value[[1]]))/(max(value[[1]]) - min(value[[1]]))
i = getI(...)
circos.genomicPoints(region, value, cex = cex, pch = 16, col = i, ...)
})
circos.genomicTrackPlotRegion(bed_list, stack = TRUE,
panel.fun = function(region, value, ...) {
cex = (value[[1]] - min(value[[1]]))/(max(value[[1]]) - min(value[[1]]))
i = getI(...)
circos.genomicPoints(region, value, cex = cex, pch = 16, col = i, ...)
cell.xlim = get.cell.meta.data("cell.xlim")
circos.lines(cell.xlim, c(i, i), lty = 2, col = "#00000040")
})
bed = generateRandomBed(nr = 100, nc = 4)
circos.genomicTrackPlotRegion(bed, panel.fun = function(region, value, ...) {
cex = (value[[1]] - min(value[[1]]))/(max(value[[1]]) - min(value[[1]]))
circos.genomicPoints(region, value, cex = 0.5, pch = 16, col = 1:4, ...)
})
circos.genomicTrackPlotRegion(bed, stack = TRUE, panel.fun = function(region, value, ...) {
cex = (value[[1]] - min(value[[1]]))/(max(value[[1]]) - min(value[[1]]))
i = getI(...)
circos.genomicPoints(region, value, cex = cex, pch = 16, col = i, ...)
cell.xlim = get.cell.meta.data("cell.xlim")
circos.lines(cell.xlim, c(i, i), lty = 2, col = "#00000040")
})
circos.clear()
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.