slideNucDiag: Sliding nucleotide diagnostics

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

Description

Calculates the number of diagnostic nucleotides in sliding windows.

Usage

1
slideNucDiag(DNAbin, sppVector, width, interval = 1)

Arguments

DNAbin

A DNA alignment of class ‘DNAbin’.

sppVector

Species vector (see sppVector).

width

Desired width of windows in number of base pairs.

interval

Distance between each window in number of base pairs. Default of 1. Giving the option of "codons" sets the size to 3.

Details

Determines the number of diagnostic nucleotides for each species in each window.

Value

A matrix giving the number of diagnostic nucleotides for each species (rows) in each window (columns).

Author(s)

Samuel Brown <s_d_j_brown@hotmail.com>

See Also

slideAnalyses, slideBoxplots, slidingWindow.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
data(dolomedes)
doloSpp <- substr(dimnames(dolomedes)[[1]], 1, 5)

slideNucDiag(dolomedes, doloSpp, 200, interval = 3)

slidND <- slideNucDiag(dolomedes, doloSpp, 200, interval = 3)

#Number of basepairs for each species
matplot(t(slidND), type = "l")

#Number of basepairs for a single species
plot(slidND[4, ], type = "l")

#Total number of basepairs per window
plot(colSums(slidND), type = "l")

spider documentation built on May 2, 2019, 5:16 p.m.