localMinima {spider} | R Documentation |
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 |
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
.
Also as help
, ~~~
Examples
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]