The editor has been updated to markdown! Please see more info at: Tutorial: Updated Support Site Editor

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


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.1k views
ADD COMMENTlink written 23 months ago by shilin.zhao30
Please log in to add an answer.


Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 16.09
Traffic: 403 users visited in the last hour