Marking and annotating several SNPs on Ideogram track by Gviz package.
1
0
Entering edit mode
vnyirongo • 0
@vnyirongo-7294
Last seen 9.2 years ago
United States

 

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.

gviz ideogram snps • 1.8k views
ADD COMMENT
0
Entering edit mode
@florianhahnenovartiscom-3784
Last seen 5.6 years ago
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 COMMENT
0
Entering edit mode

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 REPLY
0
Entering edit mode

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 REPLY
0
Entering edit mode

Florian,

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

Best,

V.

ADD REPLY

Login before adding your answer.

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