karyoploteR icon indicating copy to clipboard operation
karyoploteR copied to clipboard

Adding Base Numbers with plot.type = 6 (ideograms only)

Open etnite opened this issue 6 years ago • 3 comments

Hello @bernatgel - thank you for all of your work on this great package!

I'm not sure if I'm missing something obvious, but if I try to make an ideograms only plot (plot.type 6), adding base numbers causes the axis text to overlap each chromosome ideogram:

kp <- plotKaryotype(plot.type = 6)
kpAddBaseNumbers(kp)

ideograms

I'm wondering if there is some way to give an option so that kpAddBaseNumbers() would only add a single x-axis for basepair coordinates at the bottom of the image, which would be much cleaner in the case of only working with ideograms. I've tried using a simple call to axis(), but the problem seems a little more complicated than that.

Thank you.

etnite avatar Dec 30 '19 20:12 etnite

Hi @etnite

One option would be to add some enlarge the margin between chromosomes to add some space for the base numbers using setting the plotting parameters.

pp <- getDefaultPlotParams(6)
pp$data2outmargin <- 100

kp <- plotKaryotype(plot.type = 6, plot.params = pp)
kpAddBaseNumbers(kp)

issue_60

Although I think your idea of adding an independent scale could be a better option in some situations. It's a bit more complex than calling axis, certainly, but I'm adding it to our TODO list!

Bernat

bernatgel avatar Jan 08 '20 13:01 bernatgel

Many thanks and sorry for a slow response. I will try out your margin size suggestion for the time being.

etnite avatar Jan 22 '20 13:01 etnite

Hi, I was wondering if there is any update to adding an independent scale for the plot.

Thanks, Ankit

AHinsu avatar Aug 10 '23 11:08 AHinsu