Closed elcortegano closed 1 year ago
It is because circos.genomicDensity()
is a "high-level" function which creates a new track.
This track is basically drawn by the function circos.genomicLines()
. You can check the following code:
circos.initializeWithIdeogram(plotType = c("axis", "labels"))
gr = genomicDensity(DMR_hyper)
ymax = max(gr[, 4])
circos.genomicTrackPlotRegion(gr, ylim = c(0, ymax),
panel.fun = function(region, value, ...) {
for(i in 1:3) {
circos.lines(CELL_META$cell.xlim, rep(ymax/4*i, 2), lty = 2, col = "#AAAAAA")
}
circos.genomicLines(region, value, col = "#FF000080", border = NA, area = TRUE, baseline = 0)
})
circos.clear()
It works like a charm!, beautiful design, thank you!
Hi, I'm having difficulties finding a way to plot a track with
genomicDensity
that shows also shows background lines to easy the comparison of density across chromosomes.The following instruction works for me, but does not add tracks:
However, if embed this code within a
genomicTrack
call that creates background lines, I get a mysterious error "Your data frame is less than 3 column!". Not sure why. This is the code:Any ideas on what is going wrong? thank you!