This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Allele count from BAM file

How to get reference and alternate allele count from BAM file at a given chromosomal position?

next-gen sequencing snp

2 answers

ASEReadCounter

I dont have VCF file have only .bam file and in that file chromosomal position is specified EX: chr12:6789007

If you have reference genome, generate a VCF file from your positions of interest or call SNPs from your bam file and then calculate allele counts.

It is one line in glactools:

glactools  bam2acf [reference].fa [iinput].bam  sampleid  |  glactools  view - |cut -f 1-3,6

In the last column, the format is REF,ALT:cpg

Be aware that it filters out reads marked as QC failed and PCR duplicates.

Log in to answer this question.