chasewnelson / SNPGenie

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

unsure how SNPgenie does the polarization of mutations #54

Open mufernando opened 3 years ago

mufernando commented 3 years ago

Hi,

It's not clear to me how SNPgenie polarizes the mutations (to compute dN/dS and piN/piS).

Does it assume the ancestral states are the ones supplied in the reference fasta? If so, how would SNPgenie deal with having ancestral states in the reference fasta that do not mach the REF column in the VCF?

Thank you!

singing-scientist commented 3 years ago

Greetings, Murillo! Thanks a lot for the question. Actually, being designed originally for πN/πS, SNPGenie is entirely phylogeny-agnostic. This mean it is not calculating dN/dS (or πN/πS) along branches or lineages, but rather simply the mean value between all choose(n,2) pairs of extant (provided) sequences. This may have less power than methods that trace changes over a phylogeny. On the other hand, the approach is robust to errors in phylogenetic and ancestral sequence reconstruction, and to artifacts due to linkage or recombination. Note that this distinction is probably only necessary for dN/dS, because πN/πS usually employs this non-phylogenetic by definition (i.e., it's a population measure).

Let me know if that helps! Chase