Task at hand: Remove simple indel loci from vcf file.
------ example vcf file excerpt ----------
CHR POS ID REF ALT
1 20293 S_20293 A G
1 22689 S_22689 A -
1 23251 S_23251 - T
--------------------------------------------
$ bcftools filter -e'%TYPE="snp"' in.vcf > indels.vcf
Results in a VCF file containing only header
$ bcftools filter -e'%TYPE="indels"' in.vcf > snp.vcf
Results in a VCF file containing all variants (snps and indels)
It appears that bcftools is not treating the last two sites above as indels, but as snps. I saw the same behvior with --remove-indels filter in vcftools.
Does anyone know what's going on?
------ example vcf file excerpt ----------
CHR POS ID REF ALT
1 20293 S_20293 A G
1 22689 S_22689 A -
1 23251 S_23251 - T
--------------------------------------------
$ bcftools filter -e'%TYPE="snp"' in.vcf > indels.vcf
Results in a VCF file containing only header
$ bcftools filter -e'%TYPE="indels"' in.vcf > snp.vcf
Results in a VCF file containing all variants (snps and indels)
It appears that bcftools is not treating the last two sites above as indels, but as snps. I saw the same behvior with --remove-indels filter in vcftools.
Does anyone know what's going on?
Comment