Question: Hi all again,

I've noticed that most programs used to predict the effect of non-synonymous amino acids substitutions simply don't analyze the action of selection of any kind. Given that conservation in alignment does not mean necessarily purifying selection, I'm wondering about the true relation between conservation and selection. In order to test this idea, I really need some guidelines to calculate Ka/Ks in close and distantly related species. Any software able to deal with such situation is much welcome too!

-- Edit --

I know a lot of programs able to calculate Ka/Ks. What I really want is an expert opinion of what to do and which one to use.

Answer: Conclusions one may draw from dN/dS ratios (aka. ~Ka/Ks):

Neutral Evolution (drift): dN/dS ratio = 1 implies there has been equal numbers of synonymous (dna substitutions that do not affect the protein sequence) and non-synonymous changes (dna substitutions that do affect the protein sequence) during the time between ancestral to the modern versions of the protein.

Positive Selection (adaptive evolution): dN/dS ratio > 1 implies there has been more non-synonymous changes than synonymous changes. There has been evolutionary pressure to escape from the ancestral state - i.e. positive selection pressure. This can occur for example in paralogues that are required to serve a novel function, or in proteins of parasites that need to escape host immune recognition (e.g. changes to avoid MHC-1 binding to evade T-cell attack).

Negative Selection (conservation): dN/dS ratio < 1 implies there has been more synonymous changes than non-synonymous changes. There has been evolutionary pressure to conserve the ancestral state - i.e. negative selection pressure. This can occur for example in orthologues that are required to maintain (conserve) some function encoded in the protein sequence, since changes from this state would lead to disruption of function.

Useful Tips:

Algorithms can either run on multiple sequences, or just a pair of sequences. In either case the input sequences used to derive a dN/dS ratio must share ancestry - too divergent and there is a problem with multiple substitutions, too recent and you will not have sufficient enough observed changes to draw conclusions from.

dN/dS can be used to compare whole proteins or regions within proteins (a sliding dN/dS value across the protein.)

A dN/dS ratio calculated for a whole protein is often an underestimate (lower than it should be) due to the variety of domains that constitute each protein, for instance a alpha-helix structure may always be required in a set of proteins that perform a variety of different functions.

The only sequence changes considered are substitutions (not duplications, or inversions etc.)

Significance of a given dN/dS ratio can be assessed using Fishers exact test: read this.

Software:

Here are my recommendations for software ordered by how flexible they are:

MATLAB's Bioinformatics Toolbox: Here you have the greatest variety of alternative algorithms, operating system compatibility, sliding vs. whole protein analysis, API to Genbank, etc (Here's a great tutorial for using their dN/dS tool). Just remember MATLAB is not free.

KaKs Calculator: If you only care about whole protein dN/dS, many options are available with the Ka/Ks calculator - they also compute statistical significance using Fisher's exact test. Here's an R script I made to help you out, it plots a bar chart (with error bars), from the KaKs Calculator output files.

PAML: If you have >2 sequences per protein that you wish to get a dN/dS value for, then many options are available with PAML. This is often used in published papers, but it's not recommended if you only have a pair of sequences per protein.

VectorBase dN/dS app.: If you you just want to quickly visualize a sliding window dN/dS curve, without installing anything, me and a friend have finished a website, for you to do just that. It allows for simple pairwise, sliding window dN/dS analysis using the Nei-Gojobori method. Accuracy is comparable to MATLAB's Bioinformatics Toolbox, and performance is optimized for phone. So far the GUI can only accept VectorBase gene ids, but the dnds.py script itself can take any input pair of proteins. Performance is heavily optimized, e.g. a pair of 3000bp long proteins in <1s. When the site is finally hosted I'll post a link, code: https://github.com/a1ultima/hpcleap_dnds

![enter image description here][1]

[1]: https://github.com/a1ultima/hpcleap_dnds/raw/master/py/data/webapp_demo_dnds-and-domains.PNG