# \donttest{
circos.par("track.height" = 0.1, cell.padding = c(0, 0, 0, 0))
circos.initializeWithIdeogram(plotType = NULL)
bed1 = generateRandomBed(nr = 100)
bed2 = generateRandomBed(nr = 100)
bed_list = list(bed1, bed2)
f = colorRamp2(breaks = c(-1, 0, 1), colors = c("green", "black", "red"))
circos.genomicTrack(bed_list, stack = TRUE,
panel.fun = function(region, value, ...) {
circos.genomicRect(region, value, col = f(value[[1]]),
border = NA, ...)
i = getI(...)
cell.xlim = get.cell.meta.data("cell.xlim")
circos.lines(cell.xlim, c(i, i), lty = 2, col = "#000000")
})
circos.genomicTrack(bed_list, ylim = c(0, 3),
panel.fun = function(region, value, ...) {
i = getI(...)
circos.genomicRect(region, value, ytop = i+0.4, ybottom = i-0.4, col = f(value[[1]]),
border = NA, ...)
cell.xlim = get.cell.meta.data("cell.xlim")
circos.lines(cell.xlim, c(i, i), lty = 2, col = "#000000")
})
circos.genomicTrack(bed1, panel.fun = function(region, value, ...) {
circos.genomicRect(region, value, col = "red", border = NA, ...)
})
circos.genomicTrack(bed_list, panel.fun = function(region, value, ...) {
i = getI(...)
circos.genomicRect(region, value, col = i, border = NA, ...)
})
circos.clear()
# }
Run the code above in your browser using DataLab