div | R Documentation |
The divergence between DNA sequences can be synonymous (neutral) or non-synonymous. Synonymous differences are generally considered as a better proxy for evolutionary divergence, as it is not affected by selection. This function computes the synonymous divergence between sequences.
div(file = NULL, sequence = NULL, sqs = NULL, method = "LWL85",
pairwise = TRUE, max.lim = 3)
file |
FASTA file in which aligned sequences are stored. |
sequence |
Alternatively, the result of seqinr::read.fasta. |
sqs |
Vector of sequence names to be compared. If not provided, all pairwise comparisons will be performed. |
method |
Method used to compute the divergence. So far, only the LWL85 method (from Li et al. 1985). |
pairwise |
Boolean: should the divergence be calculated for each pair of sequences or on the whole dataset? This is of particular importance when indels (gaps) are present in sequences, as codons with gaps are generally discarded by most methods. Setting this option to |
max.lim |
Maximum value for divergence. Depending on the algorithm, various corrections can bring the divergence value above 100%. Values larger than |
The LWL85
method is a wrapper around the kaks
function from the seqinr
package.
A 3-column data frame with the following fields:
div: The divergence score
sq1: The first sequence in the comparison
sq2: The second sequence in the comparison
Aurelie Hua-Van and Arnaud Le Rouzic
Li, W. H., Wu, C. I., & Luo, C. 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.
CUB
seq.file <- system.file("extdata/Genes", "Amd.fas", package="vhica")
div(seq.file)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.