spider (version 1.5.0)

nucDiag: Nucleotide diagnostics for species alignments

Description

Determines the diagnostic nucleotides for each species given in sppVector.

Usage

nucDiag(DNAbin, sppVector)

Arguments

DNAbin

An object of class 'DNAbin'.

sppVector

The species vector (see sppVector).

Value

nucDiag returns a list giving the pure, simple diagnostic nucleotides (i.e. those nucleotides that are fixed within species and different from all other species) for each species in the species vector. A result of integer(0) indicates there are no diagnostic nucleotides for those species.

rnucDiag returns a list containing the following elements:

min

The minimum number of diagnostic nucleotides in the sample.

mean

The mean number of diagnostic nucleotides in the sample.

median

The median number of diagnostic nucleotides in the sample.

max

The maximum number of diagnostic nucleotides in the sample.

rndFreq

A list of frequency distributions of the number of diagnostic nucleotides in groups formed by 1 sequence, 2 sequences, etc.

Details

These functions provide a means for evaluating the presence of diagnostic nucleotides that distinguish species within an alignment. nucDiag returns the positions of bases corresponding to the definition of pure, simple diagnostic nucleotides given by Sarkar et al (2008).

rnucDiag runs a bootstrapping-style resampling test to evaluate the numbers of diagnostic nucleotides that might be expected by random assortment of specimens.

References

Sarkar, I., Planet, P., & DeSalle, R. (2008). CAOS software for use in character- based DNA barcoding. _Molecular Ecology Resources_ *8* 1256-1259

See Also

slideNucDiag, rnucDiag

Examples

Run this code
# NOT RUN {
data(anoteropsis)
anoSpp <- sapply(strsplit(dimnames(anoteropsis)[[1]], split="_"), 
	function(x) paste(x[1], x[2], sep="_"))

nucDiag(anoteropsis, anoSpp)


#To view the nucleotide values 
anoNuc <- nucDiag(anoteropsis, anoSpp)
as.character(anoteropsis[ ,anoNuc[[1]][1] ])



data(sarkar)
sarkarSpp <- substr(dimnames(sarkar)[[1]], 1, 3)
nucDiag(sarkar, sarkarSpp)

# }
# NOT RUN {
rnucDiag(anoteropsis, anoSpp, n = 100)
# }
# NOT RUN {
# }

Run the code above in your browser using DataCamp Workspace