nucDiagExptl: Experimental nucleotide diagnostic function for species...

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

View source: R/nucDiagExptl.R

Description

An experimental function that determines the diagnostic nucleotides for each species given in sppVector. Differs from nucDiag by attempting to include the detection of private and compound characters.

Usage

1
nucDiagExptl(DNAbin, sppVector, block = 1, category = "pure")

Arguments

DNAbin

An object of class 'DNAbin'.

sppVector

The species vector (see sppVector).

block

Numeric. Number of bases to consider. Default of 1.

category

Character vector. What category of diagnostic nucleotides should be returned? Options of "all", "pure" or "private". Default of "pure".

Details

"pure" diagnostic nucleotides are possessed by ALL members have differences at those sites, and are different from the other species.

"private" diagnostic nucleotides are possessed by only some of the individuals in the dataset.

Setting the option to "all" returns all diagnostic nucleotides regardless of whether they are pure or private.

Value

A list giving the site numbers which show diagnostic nucleotides for each species in the species vector. A result of integer(0) indicates there are no diagnostic nucleotides for those species.

Author(s)

Samuel Brown <s_d_j_brown@hotmail.com>

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

nucDiag, slideNucDiag

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
data(anoteropsis)
anoSpp <- sapply(strsplit(dimnames(anoteropsis)[[1]], split="_"), 
	function(x) paste(x[1], x[2], sep="_"))

nucDiag(anoteropsis, anoSpp)
nucDiagExptl(anoteropsis, anoSpp, block = 2)

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


data(dolomedes)
doloSpp <- substr(dimnames(dolomedes)[[1]], 1, 5)

nucDiag(dolomedes, doloSpp)
nucDiagExptl(dolomedes, doloSpp, category = "pure")
nucDiagExptl(dolomedes, doloSpp, category = "private")
nucDiagExptl(dolomedes, doloSpp, category = "all")

#An interesting exercise: Are the diagnostic nucleotides just the same as the seg.sites?
doloSeg <- seg.sites(dolomedes)
doloDiag <- nucDiagExptl(dolomedes, doloSpp, category = "all")
length(doloSeg)
length(doloDiag)
#No, they're not

doloDiagVec <- c(sort(unlist(doloDiag)), rep(NA, 16))

plot(doloDiagVec ~ doloSeg)
abline(0, 1)

spiderDev documentation built on May 2, 2019, 5:23 p.m.