Trouble with Ideogram Plots
2
0
Entering edit mode
rowlandsd • 0
@rowlandsd-8403
Last seen 8.6 years ago
United Kingdom

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!

Gviz ideogram • 1.7k views
ADD COMMENT
0
Entering edit mode
@florianhahnenovartiscom-3784
Last seen 6.2 years ago
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 COMMENT
0
Entering edit mode
rowlandsd • 0
@rowlandsd-8403
Last seen 8.6 years ago
United Kingdom

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

ADD COMMENT

Login before adding your answer.

Traffic: 836 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