Question: Marking and annotating several SNPs on Ideogram track by Gviz package.
0
gravatar for vnyirongo
4.6 years ago by
vnyirongo0
United States
vnyirongo0 wrote:

 

Hi,

How can I efficiently mark/highlight/annotate several SNPs on ideograms? I would want to plot all the human genome chromosomes on one page (using viewports).

Thanks,

V.

ideogram gviz snps • 1.0k views
ADD COMMENTlink modified 4.6 years ago by florian.hahne@novartis.com1.6k • written 4.6 years ago by vnyirongo0
Answer: Marking and annotating several SNPs on Ideogram track by Gviz package.
0
gravatar for florian.hahne@novartis.com
4.6 years ago by
Switzerland

There is no support for adding features to ideograms in Gviz. You could of course combine the ideogram with another track type, but I guess that is not what you are looking for here. There is also the OverlayTrack feature in Gviz,which allows to superimpose multiple tracks, but since IdeogramTracks are the only tracks in Gviz that somehow break the contract of having identical horizontal scales, a simple overlay will also not be that trivial.

Of course you can always just take the IdeogramTrack object, plot it using its drawGD method in a viewport that you fully control and add whatever you please on top of it.

Hope that helps at least a bit,

Florian

ADD COMMENTlink written 4.6 years ago by florian.hahne@novartis.com1.6k

Florian,

Many thanks for clarifying this...I spent quite a long time trying to do this :(

Do you know any other package or software that could somehow easily do this?

Thanks,

V.

ADD REPLYlink written 4.6 years ago by vnyirongo0

Have you looked at the ggbio package? I believe that the Karyotype stuff in the vignette on pages 14 and 15 is what you need:

library(ggbio)
data(ideoCyto, package = "biovizBase") autoplot(seqinfo(ideoCyto$hg19), layout = "karyogram")
biovizBase::isIdeogram(ideoCyto$hg19)
autoplot(ideoCyto$hg19, layout = "karyogram", cytoband = TRUE)
data(darned_hg19_subset500, package = "biovizBase") 
dn <- darned_hg19_subset500 
library(GenomicRanges) 
seqlengths(dn) 
## add seqlengths 
## we have seqlegnths information in another data set 
seqlengths(dn) <- seqlengths(ideoCyto$hg19)[names(seqlengths(dn))] 
## then we change order 
dn <- keepSeqlevels(dn, paste0("chr", c(1:22, "X"))) 
seqlengths(dn)
autoplot(dn, layout = "karyogram")

Florian

ADD REPLYlink modified 4.6 years ago • written 4.6 years ago by florian.hahne@novartis.com1.6k

Florian,

Many thanks. Yes now I think I can easily use this to get what I want.

Best,

V.

ADD REPLYlink written 4.6 years ago by vnyirongo0
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 16.09
Traffic: 142 users visited in the last hour