This is a test version of Biostars. For the public version, visit https://www.biostars.org.
how to use bcftools isec to union two vcf files?

I have the following files:

  1. A.vcf which contains one sample s1
  2. B.vcf which contains one sample s1
  3. region.bed

I'd like to merge A.vcf and B.vcf for sites in region.bed, and use A.vcf for sites present in both files. Here is my command but it does not work as I expected:

bcftools isec A.vcf.gz B.vcf.gz -R region.bed -n+1 -o tmp.vcf.gz -O z -c all -w1

Could anyone help?

Thanks a lot!

vcf bcftools union
  1. Do you want to get sites that are common for A, B and region.bed?
  2. Or you want to merge A and B files and find common sites with region.bed?
  3. And find A sites that are common for B and region.bed?

0 answers

No answers yet.

Log in to answer this question.