Question: Expand annotation on a vcf file
0
2.8 years ago by
Dee0
Dee0 wrote:

Hello!

I have a vcf file created by a bam file and another vcf file downloaded from ClinVar with all known variants with clinical significance. I have found the overlapping regions and I want to expand the annotation of the first file with the information from the second file (but I want to keep all the non pathological variants as well). Is there a function for this?

Thank you so much!

variantannotation vcf • 446 views
modified 2.8 years ago by Michael Lawrence10k • written 2.8 years ago by Dee0
Answer: Expand annotation on a vcf file
1
2.8 years ago by
United States
Michael Lawrence10k wrote:

Lets say you have two VRanges x and y from readVcfAsVRanges(). Then, in the devel version of Bioconductor (3.4), you can do:

merge(x, y, all.x=TRUE)

There is no need to find overlaps upfront. The two variant sets will be matched by position and alt.

That was so easy!

You saved the day!

Thank you so much!