karyoploteR: custom genome axis $latest.plot
0
1
Entering edit mode
7.4 years ago
VHahaut ★ 1.2k

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 for hg19 but not for a custom genome. Does someone knows how to deal with this?

Thanks!

karyoploteR R • 1.9k views
ADD COMMENT

Login before adding your answer.

Traffic: 1548 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6