haploAccum {spider} | R Documentation |
Haplotype accumulation curves
Description
haploAccum
identifies the different haplotypes represented in a set
of DNA sequences and performs the calculations for plotting haplotype
accumulations curves (see plot.haploAccum
).
Usage
haploAccum(DNAbin, method = "random", permutations = 100, ...)
Arguments
DNAbin |
A set of DNA sequences in an object of class ‘DNAbin’. |
method |
Method for haplotype accumulation. Method |
permutations |
Number of permutations for method |
... |
Other parameters to functions. |
Details
Haplotype accumulation curves can be used to assess haplotype diversity in
an area or compare different populations, or to evaluate sampling effort.
``random''
calculates the mean accumulated number of haplotypes and
its standard deviation through random permutations (subsampling of
sequences), similar to the method to produce rarefaction curves (Gotelli and
Colwell 2001).
Value
An object of class ‘haploAccum’ with items:
call |
Function call. |
method |
Method for accumulation. |
sequences |
Number of analysed sequences. |
n.haplotypes |
Accumulated number of haplotypes corresponding to each number of sequences. |
sd |
The standard deviation
of the haplotype accumulation curve. Estimated through permutations for
|
perm |
Results of the permutations for |
Note
This function is based on the functions haplotype
(E. Paradis)
from the package 'pegas' and specaccum
(R. Kindt) from the
package'vegan'. Missing or ambiguous data will be detected and indicated by
a warning, as they may cause an overestimation of the number of haplotypes.
Author(s)
Jagoba Malumbres-Olarte <j.malumbres.olarte@gmail.com>.
References
Gotellli, N.J. & Colwell, R.K. (2001). Quantifying biodiversity: procedures and pitfalls in measurement and comparison of species richness. _Ecology Letters_ *4*, 379–391.
Examples
data(dolomedes)
#Generate multiple haplotypes
doloHaplo <- dolomedes[sample(37, size = 200, replace = TRUE), ]
dolocurv <- haploAccum(doloHaplo, method = "random", permutations = 100)
dolocurv
graphics::plot(dolocurv)