Allele frequency of a gene from a .bam file.
2
0
Entering edit mode
7.6 years ago
Kasthuri ▴ 300

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!

allele frequency • 5.2k views
ADD COMMENT
0
Entering edit mode

dominant allele frequency of a gene

I'm not sure if that even makes sense. Can you elaborate on what you mean?

ADD REPLY
0
Entering edit mode

I think I mean beta allele frequency like they compute in CNVs (FREEC, for instance).

ADD REPLY
0
Entering edit mode
7.6 years ago

call the position of your gene with samtools http://www.htslib.org/workflow/

samtools mpileup -ugf ref.fa -r "chr1:1234-2345" your.bam | bcftools call -vm -o out.vcf

your should get the variants with the AF fields

ADD COMMENT
0
Entering edit mode

Thank you Pierre. Yes, I get that we can get AF from variants. But I am looking at some metric for a region, in general, like beta allele frequency they compute when calling CNVs.

ADD REPLY
0
Entering edit mode
6.9 years ago
azmanr • 0

Hi,

For one chromosome, I ran the command: samtools mpileup -ugf GRCz10.fasta mutant_chr12.bam | bcftools call -vm -o chr12.mut.raw.vcf

I seem to have used the same options for mpileup and bcftools call, but I do not seem to get the AF field in my output vcf files. I do get the DP4 field nested in the info column, but is there a way to get a seperate column for AF or at least a seperate column for DP4 in the vcf file?

Thanks, Azman

ADD COMMENT

Login before adding your answer.

Traffic: 1715 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6