Question: Filter all the common SNP's in different vcf files(corresponding to different samples)
2
gravatar for shubhra.bhattacharya
2.2 years ago by
shubhra.bhattacharya120 wrote:

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 • 1.8k views
ADD COMMENTlink modified 2.2 years ago by cpad011212k • written 2.2 years ago by shubhra.bhattacharya120
1

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

Or alternative software:

ADD REPLYlink written 2.2 years ago by sacha1.9k
0
gravatar for Pierre Lindenbaum
2.2 years ago by
France/Nantes/Institut du Thorax - INSERM UMR1087
Pierre Lindenbaum127k wrote:

merge your files with gatk combinevariants. https://software.broadinstitute.org/gatk/documentation/tooldocs/current/org_broadinstitute_gatk_tools_walkers_variantutils_CombineVariants.php

then use https://software.broadinstitute.org/gatk/documentation/tooldocs/current/org_broadinstitute_gatk_tools_walkers_variantutils_SelectVariants.php with --maxNOCALLnumber 0

ADD COMMENTlink written 2.2 years ago by Pierre Lindenbaum127k

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

ADD REPLYlink written 2.2 years ago by shubhra.bhattacharya120
0
gravatar for cpad0112
2.2 years ago by
cpad011212k
India
cpad011212k wrote:

try bcftools concat with -d option

ADD COMMENTlink written 2.2 years ago by cpad011212k
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: 1931 users visited in the last hour