if (FALSE) {
circos.par$circle.margin = 0.5
circos.par$cell.padding = rep(0, 4)
circos.par$track.margin = rep(0, 2)
circos.initialize(sectors = letters[1:4], xlim = c(0, 1))
sectors = sample(letters[1:4], 40, replace = TRUE)
x = runif(40)
text = sapply(letters[sample(26, 40, replace = TRUE)], function(x) strrep(x, sample(4:6, 1)))
circos.stackedText(sectors, x, text, bg.col = "#EEEEEE")
circos.track(ylim = c(0, 1))
circos.clear()
#### genome plot
circos.par$track.margin = rep(0, 2)
circos.par$cell.padding = rep(0, 4)
circos.initializeWithIdeogram(plotType = NULL)
bed = generateRandomBed(50)
text = sapply(
letters[sample(26, nrow(bed), replace = TRUE)],
function(x) strrep(x, sample(4:6, 1))
)
bed$text = text
circos.stackedText(bed[, 1], bed[, 2], bed$text, cex = 0.7)
circos.genomicIdeogram()
circos.clear()
}
Run the code above in your browser using DataLab