spider (version 1.5.0)

slideNucDiag: Sliding nucleotide diagnostics

Description

Calculates the number of diagnostic nucleotides in sliding windows.

Usage

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.

Value

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

Details

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

See Also

slideAnalyses, slideBoxplots, slidingWindow.

Examples

Run this code
# NOT RUN {
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
graphics::matplot(t(slidND), type = "l")

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

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


# }

Run the code above in your browser using DataLab