Filter all the common SNP's in different vcf files(corresponding to different samples)
2
2
Entering edit mode
6.8 years ago

I have 10 different vcf files which are of different samples.

I want to find the SNPs common between all of them i.e the snp should be present in all the 10 samples.

For that I am using vcftools isec but I am getting 10 different files instead of one single file with the common snps.

The readme file says: 0000.vcf has stripped reads for sample 1 , 0001.vcf has stripped reads for sample 2 and so on.

The command used is:

/data/ngs/programs/bcftools-1.3/bcftools isec -p match/ -n=10 qual-out-1.vcf.recode.vcf.gz qual-out-2.vcf.recode.vcf.gz ... qual-out-10.recode.vcf.gz

I have obtained these files from GATK pipeline.My ultimate aim is to just get one single vcf with all common snps

SNP • 4.5k views
ADD COMMENT
1
Entering edit mode

bedtools intersect -a file1.vcf -b file2.vcf file3.vcf file4.vcf

Or alternative software:

ADD REPLY
0
0
Entering edit mode

Due to some technical difficulties I am unable to use GATK and hence I am forced to use other options.

ADD REPLY
0
Entering edit mode
6.8 years ago

try bcftools concat with -d option

ADD COMMENT

Login before adding your answer.

Traffic: 888 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