Haplotype Diversity
This function computes haplotype diversity from DNA sequences. This is a generic function.
hap.div(x, ...) ## S3 method for class 'haplotype' hap.div(x, variance = FALSE, method = "Nei", ...) ## S3 method for class 'DNAbin' hap.div(x, variance = FALSE, method = "Nei", ...)
x |
an object with DNA data. |
variance |
a logical value specifying whether to calculate the variance of the estimated haplotype diversity. |
method |
(unused, see details). |
... |
further arguments passed to and from methods. |
Currently, only Nei and Tajima's (1981) method is available.
a numeric vector with one or two values (if variance = TRUE
).
Emmanuel Paradis
Nei, M. and Tajima, F. (1981) DNA polymorphism detectable by restriction endonuclease. Genetics, 97, 145–163.
data(woodmouse) hap.div(woodmouse) # all haplotypes are unique ## neuraminidase sequences from the 2009 H1N1 data (delivered with adegenet): fl <- system.file("files/pdH1N1-NA.fasta", package = "adegenet") H1N1.NA <- read.dna(fl, "fasta") hap.div(H1N1.NA, TRUE)
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.