Intersect multiple VCF files
Entering edit mode
4.4 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 • 3.0k views
Entering edit mode
4.4 years ago
Medhat 9.0k

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


Login before adding your answer.

Traffic: 2048 users visited in the last hour
Help About
Access RSS

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

Powered by the version 2.3.6