Hi All,
I have a vcf file with SNP information from multiple samples made using GATK:
gatk --java-options "-Xmx4G" HaplotypeCaller -R ref.fa -I bams.list -L ch01 -O 01.vcf
Individual vcf's were made chromosome wise and then concatenated:
bcftools concat -o merge.vcf 01.vcf 02.vcf 03.vcf 04.vcf 05.vcf
I want to keep the SNPs only for the final vcf file so I did:
bcftools filter -i 'TYPE="snp"' merge.vcf > merge_SNP.vcf
But the output file still has INDELS. Then I tried using bcftools view for the same job:
bcftools view -v snps merge.vcf > merge_SNP.vcf
The output file again has variants other than SNPs. I am not sure what is going wrong. I will appreciate any suggestions. Thank you!
You can also use
SelectVariants
module from GATK