dnds - Estimate synonymous and nonsynonymous substitution rates

Syntax

[Dn, Ds, Vardn, Vards] = dnds(SeqNT1, SeqNT2)

[Dn, Ds, Vardn, Vards] = dnds(SeqNT1, SeqNT2, ...'GeneticCode', GeneticCodeValue, ...)
[Dn, Ds, Vardn, Vards] = dnds(SeqNT1, SeqNT2, ...'Method', MethodValue, ...)
[Dn, Ds, Vardn, Vards] = dnds(SeqNT1, SeqNT2, ...'Window', WindowValue, ...)
[Dn, Ds, Vardn, Vards] = dnds(SeqNT1, SeqNT2, ...'AdjustStops', AdjustStopsValue, ...)
[Dn, Ds, Vardn, Vards] = dnds(SeqNT1, SeqNT2, ...'Verbose', VerboseValue, ...)

Arguments

SeqNT1, SeqNT2Nucleotide sequences. Enter either a string or a structure with the field Sequence.
GeneticCodeValueProperty to specify a genetic code. Enter a Code Number or a string with a Code Name from the table Genetic Code. If you use a Code Name, you can truncate it to the first two characters. Default is 1 or Standard.
MethodValue

String specifying the method for calculating substitution rates. Choices are:

  • NG (default) — Nei-Gojobori method (1986) uses the number of synonymous and nonsynonymous substitutions and the number of potentially synonymous and nonsynonymous sites. Based on the Jukes-Cantor model.

  • LWLLi-Wu-Luo method (1985) uses the number of transitional and transversional substitutions at three different levels of degeneracy of the genetic code. Based on Kimura's two-parameter model.

  • PBLPamilo-Bianchi-Li method (1993) is similar to the Li-Wu-Luo method, but with bias correction. Use this method when the number of transitions is much larger than the number of transversions.

WindowValueInteger specifying the sliding window size, in codons, for calculating substitution rates and variances.
AdjustStopsValueControls whether stop codons are excluded from calculations. Choices are true (default) or false.
VerboseValueProperty to control the display of the codons considered in the computations and their amino acid translations. Choices are true or false (default).

    Tip   Specify true to use this display to manually verify the codon alignment of the two input sequences. The presence of stop codons (*) in the amino acid translation can indicate that SeqNT1 and SeqNT2 are not codon-aligned.

Return Values

Dn Nonsynonymous substitution rate(s).
DsSynonymous substitution rate(s).
Vardn Variance for the nonsynonymous substitution rate(s).
Vards Variance for the synonymous substitutions rate(s).

Description

[Dn, Ds, Vardn, Vards] = dnds(SeqNT1, SeqNT2) estimates the synonymous and nonsynonymous substitution rates per site between the two homologous nucleotide sequences, SeqNT1 and SeqNT2, by comparing codons using the Nei-Gojobori method.

dnds returns:

This analysis:

[Dn, Ds, Vardn, Vards] = dnds(SeqNT1, SeqNT2, ...'PropertyName', PropertyValue, ...) calls dnds with optional properties that use property name/property value pairs. You can specify one or more properties in any order. Each PropertyName must be enclosed in single quotation marks and is case insensitive. These property name/property value pairs are as follows:


[Dn, Ds, Vardn, Vards] = dnds(SeqNT1, SeqNT2, ...'GeneticCode', GeneticCodeValue, ...)
calculates synonymous and nonsynonymous substitution rates using the specified genetic code. Enter a Code Number or a string with a Code Name from the table Genetic Code. If you use a Code Name, you can truncate it to the first two characters. Default is 1 or Standard.

[Dn, Ds, Vardn, Vards] = dnds(SeqNT1, SeqNT2, ...'Method', MethodValue, ...) allows you to calculate synonymous and nonsynonymous substitution rates using the following algorithms:

[Dn, Ds, Vardn, Vards] = dnds(SeqNT1, SeqNT2, ...'Window', WindowValue, ...) performs the calculations over a sliding window, specified in codons. Each output is an array containing a rate or variance for each window.

[Dn, Ds, Vardn, Vards] = dnds(SeqNT1, SeqNT2, ...'AdjustStops', AdjustStopsValue, ...) controls whether stop codons are excluded from calculations. Choices are true (default) or false.

[Dn, Ds, Vardn, Vards] = dnds(SeqNT1, SeqNT2, ...'Verbose', VerboseValue, ...) controls the display of the codons considered in the computations and their amino acid translations. Choices are true or false (default).

Examples

Estimating Synonymous and Nonsynonymous Substitution Rates Between the gag Genes of Two HIV Viruses

  1. Retrieve two sequences from the GenBank® database for the gag genes of two HIV viruses.

    gag1 = getgenbank('L11768');
    gag2 = getgenbank('L11770');
  2. Estimate the synonymous and nonsynonymous substitution rates between the two sequences.

    [dn ds vardn vards] = dnds(gag1, gag2)
    
    dn =
    
        0.0244
    
    ds =
    
        0.0697
    
    vardn =
    
      2.3509e-005
    
    vards =
    
      2.3438e-004
    
    

Estimating Synonymous and Nonsynonymous Substitution Rates Between Two Nucleotide Sequences That Are Not Codon-Aligned

  1. Retrieve two nucleotide sequences from the GenBank database for the neuraminidase (NA) protein of two strains of the influenza A virus (H5N1).

     hk01 = getgenbank('AF509094');
     vt04 = getgenbank('DQ094287');
    
  2. Extract the coding region from the two nucleotide sequences.

    hk01_cds = featuresparse(hk01,'feature','CDS','Sequence',true);
    vt04_cds = featuresparse(vt04,'feature','CDS','Sequence',true);
    
  3. Align the amino acids sequences converted from the nucleotide sequences.

     [sc,al] = nwalign(nt2aa(hk01_cds),nt2aa(vt04_cds),'extendgap',1);
    
  4. Use the seqinsertgaps function to copy the gaps from the aligned amino acid sequences to their corresponding nucleotide sequences, thus codon-aligning them.

     hk01_aligned = seqinsertgaps(hk01_cds,al(1,:))
     vt04_aligned = seqinsertgaps(vt04_cds,al(3,:))
    
  5. Estimate the synonymous and nonsynonymous substitutions rates of the codon-aligned nucleotide sequences and also display the codons considered in the computations and their amino acid translations.

    [dn,ds] = dnds(hk01_aligned,vt04_aligned,'verbose',true)
    

References

[1] Li, W., Wu, C., and Luo, C. (1985). A new method for estimating synonymous and nonsynonymous rates of nucleotide substitution considering the relative likelihood of nucleotide and codon changes. Molecular Biology and Evolution 2(2), 150–174.

[2] Nei, M., and Gojobori, T. (1986). Simple methods for estimating the numbers of synonymous and nonsynonymous nucleotide substitutions. Molecular Biology and Evolution 3(5), 418–426.

[3] Nei, M., and Jin, L. (1989). Variances of the average numbers of nucleotide substitutions within and between populations. Molecular Biology and Evolution 6(3), 290–300.

[4] Nei, M., and Kumar, S. (2000). Synonymous and nonsynonymous nucleotide substitutions" in Molecular Evolution and Phylogenetics (Oxford University Press).

[5] Pamilo, P., and Bianchi, N. (1993). Evolution of the Zfx And Zfy genes: rates and interdependence between the genes. Molecular Biology and Evolution 10(2), 271–281.

See Also

Bioinformatics Toolbox™ functions: dndsml, featuresparse, geneticcode, nt2aa, nwalign, seqinsertgaps, seqpdist

  


 © 1984-2008- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS