Learn R Programming

spider (version 1.2-0)

haploAccum: 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 "collector" enters the sequences in the order that they appear in the sequence alignment and "random" adds the sequences in a random order.
permutations
Number of permutations for method "random".
...
Other parameters to functions.

Value

  • An object of class `haploAccum' with items:
  • callFunction call.
  • methodMethod for accumulation.
  • sequencesNumber of analysed sequences.
  • n.haplotypesAccumulated number of haplotypes corresponding to each number of sequences.
  • sdThe standard deviation of the haplotype accumulation curve. Estimated through permutations for method = "random" and NULL for method = "collector".
  • permResults of the permutations for method = "random".

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).

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

Run this code
data(dolomedes)
#Generate multiple haplotypes
doloHaplo <- dolomedes[sample(37, size = 200, replace = TRUE), ] 
dolocurv <- haploAccum(doloHaplo, method = "random", permutations = 100)
dolocurv
plot(dolocurv)

Run the code above in your browser using DataLab