nucDiag: Nucleotide diagnostics for species alignments

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

View source: R/nucDiag.R

Description

Determines the diagnostic nucleotides for each species given in sppVector.

Usage

1
nucDiag(DNAbin, sppVector)

Arguments

DNAbin

An object of class 'DNAbin'.

sppVector

The species vector (see sppVector).

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.

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.

Author(s)

Samuel Brown <[email protected]>

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

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
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)

## End(Not run)

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