Hi,
I'm currently trying to filter my VCF file. I'm working on mtDNA, so I'd like to exclude heterozygous SNP. To do so, I'v tried to use bcftools filter and bcftools query, but I don't manage to keep the GT 1/1 data.
More precisely :
Do you have any idea how I could filter my data ? (except something like cat data.vcf | grep 1/1 > data_filt.vcf)
I'm using bcftools 0.2.0-rc8-5-g0e06231, samtools 1.1.
EDIT : no more problem with bcftools 1.1
I'm currently trying to filter my VCF file. I'm working on mtDNA, so I'd like to exclude heterozygous SNP. To do so, I'v tried to use bcftools filter and bcftools query, but I don't manage to keep the GT 1/1 data.
More precisely :
bcftools filter -s LowQual -e '%QUAL<20 || DP>1200 || GT!="1/1"' data.vcf > data_filt.vcf
answers : "No such INFO field: GT"
answers : "No such INFO field: GT"
bcftools filter -s LowQual -e '%QUAL<20 || DP>1200 || FORMAT/GT!="1/1"' data.vcf > data_filt.vcf
answers : " Error: the tag "INFO/AT/GT" is not defined in the VCF header"
answers : " Error: the tag "INFO/AT/GT" is not defined in the VCF header"
bcftools filter -s LowQual -e '%QUAL<20 || DP>1200 || FMT/GT!="1/1"' data.vcf > data_filt.vcf
Answers : No error message, I've a new vcf file, but data are not correctly filtered, all of them are LowQual identified (and all pass if I change != to ==)
Answers : No error message, I've a new vcf file, but data are not correctly filtered, all of them are LowQual identified (and all pass if I change != to ==)
I'm using bcftools 0.2.0-rc8-5-g0e06231, samtools 1.1.
EDIT : no more problem with bcftools 1.1