Entering edit mode
21 months ago
octpus616
▴
120
Hi
I have tried to use bcftools merge
to merge two vcf
files
# vcf a
chr1 10000 A T ..... 0/0
chr1 10003 A C ..... 1/0
chr1 10006 A G ..... 1/0
# vcf b
chr1 10000 A T ..... 0/1
chr1 10003 A T ..... 1/0
chr1 10006 A G ..... 1/1
I noted bcftools merge
will output a merged vcf like
#merged vcf
chr1 10000 A T ..... 0/0 0/1
chr1 10003 A T,C ..... 1/0 1/0
chr1 10006 A G ..... 1/0 1/1
its create a multiallelic at pos 10003, but I expected
# only keep vcf a if alt not match
chr1 10000 A T ..... 0/0 0/1
chr1 10003 A T ..... 1/0 ./.
chr1 10006 A G ..... 1/0 1/1
or
# report vcf a and vcf b in different record, so that we can filter records we need
chr1 10000 A T ..... 0/0 0/1
chr1 10003 A T ..... 1/0 ./.
chr1 10003 A C ..... ./. 1/0
chr1 10006 A G ..... 1/0 1/1
Is there some easy way to do this?
Regrads
Zhang