Plot data from VCF using Gviz?
1
0
Entering edit mode
Johannes Rainer ★ 2.1k
@johannes-rainer-6987
Last seen 7 weeks ago
Italy

Dear all,

I was just wondering, is there a way to visualize variants in a VCF file using Gviz? I had a quick look at the vignette and googled around but could not find anything.

Any help appreciated!

cheers, jo

gviz variantannotation vcf • 2.8k views
ADD COMMENT
0
Entering edit mode

Have you looked at ggbio for that sort of thing?

 

 

ADD REPLY
0
Entering edit mode

No, I haven't, but I will, thanks!

ADD REPLY
0
Entering edit mode
@valerie-obenchain-4275
Last seen 2.9 years ago
United States

I don't know of a method on a VCF file but if you have a VCF class object you can just extract/manipulate the rowRanges():

DataTrack(rowRanges(myVCF))

Valerie

ADD COMMENT
0
Entering edit mode

That works, yes. However, I didn't want to load the full VCF file. I fetched a VcfFile from AnnotationHub and was looking for a possibility to just load variants in the genomic region that is plotted from the file (on the fly). I've just added such a functionality for FaFiles to Gviz... if possible that would be nice for VcfFiles too.

ADD REPLY
2
Entering edit mode

Have you tried ScanVcfParam() to load select regions and/or fields? Make a GRanges of the region you want to plot and use it as the 'which':

param <- ScanVcfParam(which = GRanges("chr1", IRanges(5000, 7000)), info="DP")

readVcf(file, "genome", param=param)
ADD REPLY

Login before adding your answer.

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