spider (version 1.5.0)

localMinima: Determine thresholds from a density plot

Description

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

Usage

localMinima(distobj)

Arguments

distobj

A distance object (usually from dist.dna).

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.

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.

See Also

dist.dna, density. Also as help, ~~~

Examples

Run this code
# NOT RUN {

data(anoteropsis)
anoDist <- ape::dist.dna(anoteropsis)

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

# }

Run the code above in your browser using DataLab