Visualizing gene variants (gviz)
0
0
Entering edit mode
4.2 years ago
bsmith030465 ▴ 240

Hi,

I had about one hundred variants on a gene that I would like to visualize (pdf/png). I tried with Gviz, but it seems that the there are too many variants to fit in a single row and they get split over multiple rows. Is there a way I can get them to display on a single row?

For example, my code for this graph is something like:

 library(Gviz)

 grtr <- GeneRegionTrack(pkd.gmodel,name="Gene Model",showId=T)
 gtr <- GenomeAxisTrack() 
 itr <- IdeogramTrack(genome="hg38", chromosome="chr7")
 atr.old <- AnnotationTrack(tdf.old, name="Variants (previous)")
 atr.new <- AnnotationTrack(tdf.new, name="Variants (new)") 
 plotTracks(list(itr,gtr,atr.old,atr.new,grtr)) 

> tail(tdf.old)
       start      end chromosome newidx genome
102 47890682 47890683       chr7  FALSE   hg38
103 47893932 47893933       chr7  FALSE   hg38

Alternatively, is there a web tool that might be better suited for this purpose? I just want a png/tiff/pdf...

thanks!

gviz SNP • 1.5k views
ADD COMMENT
0
Entering edit mode

If I am not wrong you should be able to do this by changing the dimensions of the final plot. For instance if you are saving the final plot as a PDF try having longer width. That might save the problem.

pdf('variants_genomeBrowser.pdf', height=3, width=15)
plotTracks(list(itr,gtr,atr.old,atr.new,grtr))
dev.off()

See what happens when you do this!

ADD REPLY
0
Entering edit mode

I tried it with width=15, but it doesn't seem to make a difference. New graph here

ADD REPLY
0
Entering edit mode

I can't access the image. Did it at least reduced the number of rows? You can increase width (width=20, or any number) and see that helps.

ADD REPLY

Login before adding your answer.

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