It is easy to get allele frequency for a site (mutation/snp etc.) from a bam file. How do we get the allele frequency of a gene (in some metric) from a .bam file, like dominant allele frequency of a gene, for instance? Any advice from population genetics people here? Thanks!