chasewnelson / SNPGenie

Program for estimating πN/πS, dN/dS, and other diversity measures from next-generation sequencing data
GNU General Public License v3.0
109 stars 37 forks source link

SNPgenie for one bacterial strain #40

Open SolayMane opened 4 years ago

SolayMane commented 4 years ago

Dear Chase, I have a vcf file for snps of one strain against a ref. Can I use SNPgenie to calculate Pi trough the whole genome using sliding window? Sincerely

singing-scientist commented 4 years ago

Greetings @SolayMane ! Yes you can. If you want to do it yourself for a certain window, πN can be calculated as sum(N_diffs) / sum(N_sites), where N=nonsynonymous, and πS in the same way using S (for synonymous). But make sure the windows are not too small, or they will be subject to wild random fluctuations! Let me know if that helps.