Question: Plot data from VCF using Gviz?
0
gravatar for Johannes Rainer
4.1 years ago by
Johannes Rainer1.5k
Italy
Johannes Rainer1.5k wrote:

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

variantannotation gviz vcf • 1.5k views
ADD COMMENTlink modified 4.1 years ago by Valerie Obenchain6.7k • written 4.1 years ago by Johannes Rainer1.5k

Have you looked at ggbio for that sort of thing?

 

 

ADD REPLYlink written 4.1 years ago by James W. MacDonald52k

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

ADD REPLYlink written 4.1 years ago by Johannes Rainer1.5k
Answer: Plot data from VCF using Gviz?
0
gravatar for Valerie Obenchain
4.1 years ago by
United States
Valerie Obenchain6.7k wrote:

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 COMMENTlink written 4.1 years ago by Valerie Obenchain6.7k

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 REPLYlink written 4.1 years ago by Johannes Rainer1.5k
2

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 REPLYlink written 4.1 years ago by Valerie Obenchain6.7k
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: 174 users visited in the last hour