Entering edit mode
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)