Question: Trouble with Ideogram Plots
0
4.3 years ago by
United Kingdom
rowlandsd0 wrote:

Hi All,

I am having trouble plotting an ideogram for mm9 chr 7 using Gviz as per the example in the help file. Every time I plot it the ideogram it produces looks nothing like what I want (very large). It does have the labels etc. and the region I want, but not the demenions. I wonder if this is because I have the latest version of R?

ideoTrack <- IdeogramTrack(genome = "mm9", chromosome = "chr7")

plotTracks(ideoTrack, from = 79053483, to = 79115099, showBandId = TRUE)

It feels like I'm missing something obvious and am a bit of an idiot :(

Thanks for the help!

ideogram gviz • 757 views
modified 4.3 years ago • written 4.3 years ago by rowlandsd0
Answer: Trouble with Ideogram Plots
0
4.3 years ago by
Switzerland

I am not quite sure what exactly you are asking for, but maybe you can get the plots you want with a bit of background on Gviz plots:

In general, the plot dimensions of a Gviz plot are determined by the size of the plotting device. Gviz will try and make best use of the available space. If you only plot an IdeogramTrack object and nothing else, it will use up all of the vertical space for that. Plotting IdeogramTacks together with other Gviz track objects is a bit of a special case, because it will restrict the vertical space used for the Ideogram to a reasonable default, and distribute all of the other track objects over the remaining space (this is only roughly true, some of the other track object types will ask for larger proportions of the remaining space),

If you want to plot an IdeogramTrack object with a certain height and width you will have to set the dimensions of you plotting device accordingly. For instance, you could do this:

x11(height=1, width=10)
plotTracks(ideoTrack, from = 79053483, to = 79115099, showBandId = TRUE)

Hope this helps,

Florian

Answer: Trouble with Ideogram Plots
0
4.3 years ago by
United Kingdom
rowlandsd0 wrote:

Oh this does help! Mostly by exposing my fundamental misunderstanding of how R works. Thanks! :)