Search
Question: Trouble with Ideogram Plots
0
gravatar for rowlandsd
3.3 years ago by
rowlandsd0
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!

ADD COMMENTlink modified 3.3 years ago • written 3.3 years ago by rowlandsd0
0
gravatar for florian.hahne@novartis.com
3.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

ADD COMMENTlink written 3.3 years ago by florian.hahne@novartis.com1.6k
0
gravatar for rowlandsd
3.3 years ago by
rowlandsd0
United Kingdom
rowlandsd0 wrote:

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

ADD COMMENTlink written 3.3 years ago by rowlandsd0
Please log in to add an answer.

Help
Access

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