haploAccum: Haplotype accumulation curves

Description Usage Arguments Details Value Note Author(s) References Examples

View source: R/haploAccum.R

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

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

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 method = "random" and NULL for method = "collector".

perm

Results of the permutations for method = "random".

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 <[email protected]>.

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

1
2
3
4
5
6
data(dolomedes)
#Generate multiple haplotypes
doloHaplo <- dolomedes[sample(37, size = 200, replace = TRUE), ] 
dolocurv <- haploAccum(doloHaplo, method = "random", permutations = 100)
dolocurv
graphics::plot(dolocurv)

spider documentation built on Feb. 17, 2018, 1:02 a.m.