This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Reference And Alternative Allele Count

Hi, I'm working on polypoid plant. Where using samtools and BCF tools to call SNP. We realize that bcftools have difficulty calling some simplex genotype and i would like doing it on my own. Is there a way to extract the number of reference and alternative allele from a mpileup format?

Thanks,

Gabrielle

reference allele

4 answers

See this post to get most of the way there using samtools mpileup. The other suggestion to consider other SNP callers is good too. I recall that FreeBayes can handle arbitrary ploidy, but I don't have any personal experience with it.

You can use Bio::DB::Sam to get reference and alternative allele counts directly from a BAM file.

Thanks, i will look at those option

Hi. Welcome to BioStar. For future reference, this comment should have been added as a comment to one of the answers or the original question. Also, the best way to thank people for their answers is by voting up the answers you find useful by pressing those triangle buttons along the left hand side of the page. Good luck and welcome to the community!

Rather than hacking samtools to handle polyploid detection, I would suggest using FreeBayes. It's designed to detect SNPs, indels, and complex variants (such as MNPs and other block substitutions) without restriction of ploidy.

I'm the author, so please email me if you have any questions.

Can you call multiple bam simultaneously? IE strait to a multi individual vcf? Are you in the Marth lab?

Yes, I'm in the Marth lab. FreeBayes goes directly from (potentially 10s of thousands of) BAMs to a multi-sample VCF.

Log in to answer this question.