Expand annotation on a vcf file
1
0
Entering edit mode
Dee • 0
@dee-11074
Last seen 7.8 years ago

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!

vcf variantannotation • 1.2k views
ADD COMMENT
1
Entering edit mode
@michael-lawrence-3846
Last seen 2.4 years ago
United States

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.

ADD COMMENT
0
Entering edit mode

That was so easy!

You saved the day!

Thank you so much!

ADD REPLY

Login before adding your answer.

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