Question: Adjusting distance between chromosome ideograms in karyoplote R
gravatar for divya.nandakumar
7 months ago by
divya.nandakumar20 wrote:

I am trying to use KaryoploteR to draw ideograms, mark regions and also annotate them using kpPlotMarkers. While I am able to get nice looking ideograms, I am having some trouble with the labeling using kpPlotMarkers. The annotations overlap with adjacent chromosomes.

I was wondering if there is a way to increase the distance between the chromosomes or if I should just make independent images for each chromosome and put it together later. I tried playing around with some of the plot parameters such as data1 and data2 height and margins but they did not help. Would appreciate any suggestions!

karyoploter ideogram • 294 views
ADD COMMENTlink modified 5 weeks ago by kevin.stachelek10 • written 7 months ago by divya.nandakumar20
gravatar for SMK
7 months ago by
SMK1.9k wrote:

You can try to change the plotting parameters (adjusting data1height to your need):


plot.params <- getDefaultPlotParams(plot.type = 2)
plot.params$data1height <- 1000

kp <-
    genome = "hg19",
    plot.type = 2,
    chromosomes = c("chr1", "chr2", "chr3"),
    plot.params = plot.params

Have a look at 3.4 Changing the plotting parameters.

ADD COMMENTlink modified 7 months ago • written 7 months ago by SMK1.9k
gravatar for kevin.stachelek
5 weeks ago by
kevin.stachelek10 wrote:

The ideogram is created by plotKaryotype which itself calls kpAddCytobands which calls graphics::rect. The linewidth argument lwd to this function was helpful for me to increase the spacing between chromosomes. It can modified at the level of plotKaryotype via ellipses.

ADD COMMENTlink written 5 weeks ago by kevin.stachelek10
Please log in to add an answer.


Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 688 users visited in the last hour