This function takes a pairwise alignment as input file and estimates the dNdS ratio of the corresponding alignment. Nevertheless, this function is a helper function for dNdS. For dNdS computations you should use the function: dNdS.

substitutionrate(
  file,
  est.method,
  format = "fasta",
  quiet = FALSE,
  subst_name = NULL
)

Arguments

file

a character string specifying the path to a codon alignment file

est.method

a character string specifying the dNdS estimation method, e.g. "Comeron","Li" . Note, that when using "Comeron" as dNdS estimation method, the program 'gestimator' is used to compute the corresponding dNdS values from a given alignment. The program 'gestimator' can only read "fasta" files, hence it is important to use format = "fasta" when choosing est.method = "Comeron".

format

a character string specifying the file format in which the alignment is stored: "mase", "clustal", "phylip", "fasta" , "msf"

quiet

a logical value specifying whether the output of the coresponding interface shall be printed out.

subst_name

a character string specifying the substitution name that shall be added to the internal folder path naming. Default is subst_name = NULL.

Value

A data.table storing the query_id, subject_id, dN, dS, and dNdS values or a data.table storing the query_id, method, dN, dS, and dNdS values when using KaKs_Calculator. If the dNdS value cannot be calculated NA is returned. This can happen because of constraints of the used model. As each program throws different exception values we set all of them to NA instead.

Details

This function takes a pairwise alignments file as input and estimates dNdS ratios of the corresponding alignments using predefined dNdS estimation methods.

The dNdS estimation methods available in this function are:

  • "Comeron" : Comeron's method (1995)

References

Li, W.-H. (1993) Unbiased estimation of the rates of synonymous and nonsynonymous substitution. J. Mol. Evol., 36:96-99.

Charif, D. and Lobry, J.R. (2007) SeqinR 1.0-2: a contributed package to the R project for statistical computing devoted to biological sequences retrieval and analysis.

Thornton, K. (2003) libsequence: a C++ class library for evolutionary genetic analysis. Bioinformatics 19(17): 2325-2327

Zhang Z, Li J, Zhao XQ, Wang J, Wong GK, Yu J: KaKs Calculator: Calculating Ka and Ks through model selection and model averaging. Genomics Proteomics Bioinformatics 2006 , 4:259-263.

https://code.google.com/p/kaks-calculator/wiki/KaKs_Calculator

https://code.google.com/p/kaks-calculator/wiki/AXT

See also

dNdS, multi_aln, codon_aln, blast_best, blast_rec, read.cds

Author

Hajk-Georg Drost