# \donttest{
circos.initialize(c("a"), xlim = c(0, 1))
circos.track(ylim = c(0, 1), track.height = 0.7, bg.border = NA,
panel.fun = function(x, y) {
circos.lines(CELL_META$cell.xlim, rep(CELL_META$cell.ylim[1], 2), col = "#CCCCCC")
circos.lines(CELL_META$cell.xlim, rep(CELL_META$cell.ylim[2], 2), col = "#CCCCCC")
x0 = runif(100)
x1 = runif(100)
circos.connect(x0, 0, x1, 1,
type = "normal", border = NA,
col = rand_color(100, luminosity = "bright", transparency = 0.75))
})
circos.initialize(c("a"), xlim = c(0, 1))
circos.track(ylim = c(0, 1), track.height = 0.7, bg.border = NA,
panel.fun = function(x, y) {
circos.lines(CELL_META$cell.xlim, rep(CELL_META$cell.ylim[1], 2), col = "#CCCCCC")
circos.lines(CELL_META$cell.xlim, rep(CELL_META$cell.ylim[2], 2), col = "#CCCCCC")
x0 = runif(100)
x1 = runif(100)
circos.connect(x0, 0, x1, 1,
type = "bezier", border = NA,
col = rand_color(100, luminosity = "bright", transparency = 0.75))
})
circos.initialize(c("a"), xlim = c(0, 1))
circos.track(ylim = c(0, 1), track.height = 0.7, bg.border = NA,
panel.fun = function(x, y) {
circos.lines(CELL_META$cell.xlim, rep(CELL_META$cell.ylim[1], 2), col = "#CCCCCC")
circos.lines(CELL_META$cell.xlim, rep(CELL_META$cell.ylim[2], 2), col = "#CCCCCC")
x0 = sort(runif(200))
x0 = matrix(x0, ncol = 2, byrow = TRUE)
x1 = sort(runif(200))
x1 = matrix(x1, ncol = 2, byrow = TRUE)
circos.connect(x0, 0, x1, 1,
type = "normal", border = NA,
col = rand_color(100, luminosity = "bright", transparency = 0.5))
})
circos.initialize(c("a"), xlim = c(0, 1))
circos.track(ylim = c(0, 1), track.height = 0.7, bg.border = NA,
panel.fun = function(x, y) {
circos.lines(CELL_META$cell.xlim, rep(CELL_META$cell.ylim[1], 2), col = "#CCCCCC")
circos.lines(CELL_META$cell.xlim, rep(CELL_META$cell.ylim[2], 2), col = "#CCCCCC")
x0 = sort(runif(500))
x0 = matrix(x0, ncol = 2, byrow = TRUE)
x0 = x0[sample(nrow(x0), nrow(x0)), ]
x1 = sort(runif(500))
x1 = matrix(x1, ncol = 2, byrow = TRUE)
x1 = x1[sample(nrow(x1), nrow(x1)), ]
l = abs(x0[, 1] - x1[, 1]) < 0.5
circos.connect(x0[l ,], 0, x1[l, ], 1,
type = "bezier", border = NA,
col = rand_color(sum(l), luminosity = "bright", transparency = 0.5))
})
# }
Run the code above in your browser using DataLab