Direction of Selection (DoS)
MKado reports the Direction of Selection (DoS) statistic from Stoletzki & Eyre-Walker (2011).
Background
The Neutrality Index (NI) has limitations as a measure of selection:
Asymmetric: NI ranges from 0 to infinity, making interpretation difficult
Unbounded: Values can become very large with small counts
Undefined: Cannot be calculated when Dn=0, Ds=0, or Ps=0
DoS addresses these issues by providing a symmetric, bounded measure of selection.
The DoS Formula
Where:
Dn = Non-synonymous divergence (fixed differences)
Ds = Synonymous divergence (fixed differences)
Pn = Non-synonymous polymorphisms
Ps = Synonymous polymorphisms
Interpretation
DoS measures the difference between the proportion of non-synonymous changes among divergent sites versus polymorphic sites:
DoS = 0: Neutral evolution (equal proportions)
DoS > 0: Positive selection (excess adaptive substitutions)
DoS < 0: Slightly deleterious polymorphisms (excess non-synonymous polymorphism)
Advantages over NI
Property |
NI |
DoS |
|---|---|---|
Range |
0 to ∞ |
-1 to +1 |
Neutral expectation |
1 |
0 |
Symmetry |
Asymmetric |
Symmetric around 0 |
Behavior with small counts |
Can be extreme |
Well-behaved |
Interpretability |
Harder |
Easier (direct comparison of proportions) |
Output
DoS is automatically included in all MK test outputs:
Pretty format:
MK Test Results:
Divergence: Dn=6, Ds=8
Polymorphism: Pn=1, Ps=8
Fisher's exact p-value: 0.176
Neutrality Index (NI): 0.1667
Alpha (α): 0.8333
DoS: 0.3175
JSON format:
{
"dn": 6,
"ds": 8,
"pn": 1,
"ps": 8,
"p_value": 0.176,
"ni": 0.1667,
"alpha": 0.8333,
"dos": 0.3175
}
TSV format:
Dn Ds Pn Ps p_value NI alpha DoS
6 8 1 8 0.176 0.1667 0.8333 0.3175
Example Calculation
Using the classic Kreitman Adh data (Dn=6, Ds=8, Pn=1, Ps=8):
This positive value indicates an excess of non-synonymous divergence relative to polymorphism, consistent with positive selection.
Edge Cases
DoS handles edge cases gracefully:
Zero divergence (Dn+Ds=0): The divergence ratio is treated as 0
Zero polymorphism (Pn+Ps=0): The polymorphism ratio is treated as 0
All zeros: Returns
None(no data to analyze)
This behavior makes DoS more robust than NI when counts are sparse.
Reference
Stoletzki N, Eyre-Walker A (2011) Estimation of the Neutrality Index. Molecular Biology and Evolution 28(1):63-70. https://doi.org/10.1093/molbev/msq249