Search
Question: merge vcf files with different samples and variants?
2
gravatar for shilin.zhao
8 months ago by
shilin.zhao30
United States
shilin.zhao30 wrote:

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
ADD COMMENTlink written 8 months ago by shilin.zhao30
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 2.2.0
Traffic: 164 users visited in the last hour