localMinima: Determine thresholds from a density plot

Description Usage Arguments Details Value Author(s) See Also Examples

Description

This function determines possible thresholds from the distance matrix for an alignment.

Usage

1
localMinima(distobj)

Arguments

distobj

A distance object (usually from dist.dna).

Details

This function is based on the concept of the barcoding gap, where a dip in the density of genetic distances indicates the transition between intra- and inter-specific distances. Understanding your data is vital to correctly interpreting the output of this function, but as a start, the first local minimum is often a good place to start.

The value of this function is that it does not require prior knowledge of species identity to get an indication of potential threshold values.

Value

An object of class ‘density’, which is a list containing the values calculated by density. The element localMinima has been added, which contains the values of the local minima of the density plot.

Author(s)

Samuel Brown <s_d_j_brown@hotmail.com>

See Also

dist.dna, density.

Examples

1
2
3
4
5
6
7
8
data(anoteropsis)
anoDist <- dist.dna(anoteropsis)

anoThresh <- localMinima(anoDist)
plot(anoThresh)
anoThresh$localMinima
#Often the first value is the one to go for:
anoThresh$localMinima[1]

spider documentation built on May 2, 2019, 5:16 p.m.