This function computes the nucleotide diversity from a sample of DNA sequences or a set of haplotypes.
1 2 3 4 5
a matrix or a list which contains the DNA sequences.
a logical indicating whether to compute the variance of the estimated nucleotide diversity.
a logical indicating whether to delete the sites with missing data in a pairwise way. The default is to delete the sites with at least one missing data for all sequences.
further arguments to be passed.
This is a generic function with methods for classes
"haplotype". The first method uses the sum of the number of
differences between pairs of sequences divided by the number of
comparisons (i.e. n(n - 1)/2, where n is the number of
sequences). The second method uses haplotype frequencies. It could be
that both methods give (slightly) different results because of missing
or ambiguous nucleotides: this is generally solved by setting
pairwise.deletion = TRUE.
The variance of the estimated diversity uses formula (10.9) from Nei
(1987). This applies only if all sequences are of the same lengths,
and cannot be used if
pairwise.deletion = TRUE. A bootstrap
estimate may be in order if you insist on using the latter option.
A numeric vector with one or two values if
variance = TRUE.
Nei, M. (1987) Molecular evolutionary genetics. New York: Columbia University Press.
1 2 3 4
Loading required package: ape Loading required package: adegenet Loading required package: ade4 /// adegenet 2.1.1 is loaded //////////// > overview: '?adegenet' > tutorials/doc/questions: 'adegenetWeb()' > bug reports/feature requests: adegenetIssues() Attaching package: 'pegas' The following object is masked from 'package:ade4': amova The following object is masked from 'package:ape': mst  0.0129461  1.294610e-02 4.820826e-05  0.01316744
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.