Thanks!! I didn't knew about the plugins!!! It worked great.
Hi, I use Freebayes as variant caller and I usually use vcftools to perform hard filtering of variants based on minimum depth values.
So for example, if any sample has a value of less than 8 reads (DP), the GT is not taken into account.
An example of the output (after using vcf-query) is:
SNP REF ALT GT RO/AO DP
SNP1 A T A/A 10/0 10
SNP2 T G T/G 20/40 60
SNP3 C G C/C 15/0 15
SNP4 T G G/G 0/9 9
SNP5 A G ./. 2/3 5
The command I use is
vcftools --gzvcf input.vcf.gz --minDP 8 --recode --recode-INFO-all --out output which let me modify the GT call based on the DP value.
My main problem, is that vcftools doesn't support polyploids for this type of filtering. Is there a similar function in bcftools. If so, I cannot find it.
Thanks
1 answer
The bcftools plugin setGT might help you here:
bcftools +setGT input.vcf -- -t q -n . -i 'FORMAT/DP<8'
This would set any genotype to ./. for samples with DP<8
fin swimmer
Glad finswimmer's solution worked for you, dfajar2. I've moved it to an answer. Please click on the green check mark to mark your question as resolved.

Log in to answer this question.