Intersect multiple VCF files
1
0
Entering edit mode
6.9 years ago
ciemanek ▴ 140

Hey guys,

Is there any way to use bedtools intersect on multiple VCF files to get only variants that are common for all those files? From the manual I counclude that in standard use output would be variants that are present in query and at least one database file, while I need those that would be present in all databse files.

All the best, Agata

SNP vcf intersect vcftools bedtools • 4.2k views
ADD COMMENT
3
Entering edit mode
6.9 years ago
Medhat 9.7k

I think you need to use bcftools isec

Creates intersections, unions and complements of VCF files. Depending on the options, the program can output records from one (or more) files which have (or do not have) corresponding records with the same position in the other files.

assuming that you have 3 files
bcftools isec -p dir -n=3 A.vcf.gz B.vcf.gz C.vcf.gz

read more

Note: vcf-isec do the same work

ADD COMMENT

Login before adding your answer.

Traffic: 1520 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6