Is there a tool already out there that can add the QualityOfDepth(QD) annotation to a VCF file created by freebayes?
The general idea of variant QualityByDepth(QD) is explained here
and the detailed formula is the best answer (highlighted in green) here
http://gatkforums.broadinstitute.org/discussion/comment/18866
Freebayes outputs somewhat different fields than GATK. Instead of AC (allele count) per genotype:
##FORMAT=<ID=RO,Number=1,Type=Integer,Description="Reference allele observation count">
##FORMAT=<ID=AO,Number=A,Type=Integer,Description="Alternate allele observation count">
The basic QD formula should be something like.
QD = QUAL / Sum (Sum (RO+AO)) (over just the samples that have a read that contributes to the variant call).