Entering edit mode
Hi!
I would like to dynamically modify the axis from custom genomes plotted with karyoploteR.
Example:
library(karyoploteR) custom.genome <- toGRanges(data.frame(chr="chr1", start=1, end=10e7) kp <- plotKaryotype(genome = custom.genome) regions <- GRanges(seqnames=rep("chr1", 100), IRanges(start=round(runif(100,min = 100, max=10e7)), width=10000)) kpPlotDensity(kp, data=regions)
Then use:
kpAxis(kp, ymax=kp$latest.plot$computed.values$max.density, r0=0, r1=1, cex=0.8)
In order to get an ymax properly representing my data. So far it seems to work in-build genomes (hg19) but not for a custom genome.
Is this currently possible? Does someone has any idea how to do it?
Thanks!