This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Visualizing gene variants (gviz)

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

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!

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

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.

0 answers

No answers yet.

Log in to answer this question.