merge vcf files with different samples and variants?
0
2
Entering edit mode
shilin.zhao ▴ 30
@shilinzhao-7822
Last seen 4.2 years ago
United States

Hello, 

I've searched on this site and found some questions about merging vcf with same samples or variants by rbind or cbind. My questions is about merging vcf files with different samples and variants? Is there any function which can do it? Thanks!

 

For example:

vcf file1:

chr1   Pos1 Sample1(Variant0/1)

chr1   Pos2 Sample1(Variant0/1)

vcf file2:

chr1   Pos1 Sample2(Variant0/1)

chr1   Pos3 Sample2(Variant0/1)

 

Expected merged result:

chr1   Pos1 Sample1(Variant0/1) Sample2(Variant0/1)

chr1   Pos2 Sample1(Variant0/1) NA (or No Variant 0/0)

chr1   Pos3 NA (or No Variant 0/0) Sample2(Variant0/1) 

 

 

 

 

 

 

vcf • 1.8k views
ADD COMMENT

Login before adding your answer.

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