Question: Using BCFtools to intersect multiple VCF files
0
gravatar for Hadi M
15 months ago by
Hadi M30
Hadi M30 wrote:

Hi all,

I have 5 VCF files (A, B, C, D, and E) and I want to obtain all the variants shared by A and B only (not found in C, D, and E). I used BCFtools to do this and output all the positions. When I examined the variants using IGV, I still find variants that are not shared exclusively between A and B. This is the command I used:

bcftools isec -c none -n=2 -p isec A.vcf.gz B.vcf.gz C.vcf.gz D.vcf.gz E.vcf.gz

I would appreciate if you can help me find the fault in my command. Cheers :)

isec bcftools • 1.4k views
ADD COMMENTlink written 15 months ago by Hadi M30
3
gravatar for RamRS
15 months ago by
RamRS27k
Houston, TX
RamRS27k wrote:

The command you're using translates to "pick variants found in any two files". You should change it so it follows a pattern similar to the fifth example in the manual:

Print a list of records which are present in A and B but not in C and D

bcftools isec -n~1100 -c all A.vcf.gz B.vcf.gz C.vcf.gz D.vcf.gz
  
ADD COMMENTlink modified 15 months ago • written 15 months ago by RamRS27k
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.3.0
Traffic: 1238 users visited in the last hour