Question: Tools to detect SNP supporting read count in each bam file
gravatar for sckinta
4.3 years ago by
United States
sckinta550 wrote:


I have 45 pool-seq samples and aligned to reference (bam file). Those 45 pool-seq belong to 3 groups, say group 1, group 2 and group 3, thus each group have 15 samples. I combined 45 pool-seq samples and change the RGSM to Group number, ran freebayes to detect SNP. The vcf gives the result of genotype for each group, but not for each sample. 

Now with given SNP information (chr and pos), I have to detect read count number supporting for each SNP in each pool-seq samples instead of group. 


Given variant at chr1:2000, major allele is A and minor is G. I want to know how many A and how many G in pool-seq Sample_1 respectively at that position. 

Any tools can do that?

Thank you

snp alignment • 1.8k views
ADD COMMENTlink modified 4.3 years ago by ernfrid200 • written 4.3 years ago by sckinta550
gravatar for ernfrid
4.3 years ago by
United States
ernfrid200 wrote:

I have not run freebayes much myself, but looking at its code, it seems that there should be RO and AO tags in the FORMAT columns for each pool that answer your question.

Re-running freebayes is likely to be your most comprehensive bet, especially if you become interested in indels. That said, you can get counts by either parsing samtools mpileup output or using bam-readcount ( Fair disclosure, I am the author of the latter tool.

ADD COMMENTlink modified 4.3 years ago • written 4.3 years ago by ernfrid200

Yes, it has RO and AO for each sample group (each containing 15 individual pool-seq samples), but not for individual pool-seq samples/libraries. I can rerun freebayes on reheaded each library RGSM to distinguished names (instead of sample group name), but freebayes itself takes really really long time to finish.

ADD REPLYlink written 4.3 years ago by sckinta550

I understand now. Answer edited with two possible methods.

ADD REPLYlink written 4.3 years ago by ernfrid200

Thank you! I will try it. I wrote a script too, but it is super slow. 

ADD REPLYlink written 4.2 years ago by sckinta550
Please log in to add an answer.


Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 1217 users visited in the last hour