slideNucDiag {spider} | R Documentation |
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 |
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 |
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
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")
[Package spider version 1.5.0 Index]