I want to add a track to a circos plot using the circlize package in R to visualize gene density across a genome.
When using the circos.genomicsDensity() function, however, it looks like the gene density line does not spread through the total chromosome lengths, like some cell padding is present.
This is especially problematic for very small chromosomes where the gene density is not even showing because the cell padding is taking all the space.
I tried different parameter for "cell.padding". I can move the bottom and top padding without any problem, but I can't seem to be able to move the right and left padding within each cell.
library(circlize)
bed = generateRandomBed(nr = 1000)
circos.par("cell.padding" = c(0,0,0,0))
circos.initializeWithIdeogram()
circos.genomicDensity(bed,
col = "#FF000080",
track.height = 0.1,
cell.padding = c(0,-10,0,-10))
circos.initializeWithIdeogram()
circos.genomicDensity(bed,
col = "#FF000080",
track.height = 0.1,
cell.padding = c(0,0,0,0))
circos.initializeWithIdeogram()
circos.genomicDensity(bed,
col = "#FF000080",
track.height = 0.1,
cell.padding = c(0,mm_h(0),0,mm_h(0)))
Here, I am using the human genome as an example and the padding within each cell is not a big problem. When using small bacterial genomes, however, the padding becomes really obvious especially if these organisms have small plasmids.
Does anybody know how to move the right and left padding within each cell?