titv {spider} | R Documentation |
Number of pairwise transitions and transversions in an alignment.
Description
Calculates the number of pairwise transitions and transversions between sequences.
Usage
titv(DNAbin)
Arguments
DNAbin |
A DNA alignment of class ‘DNAbin’. |
Value
A square matrix with dimensions of length(dat)
. The upper
triangle contains the number of transversions. The lower triangle contains
the number of transitions.
Author(s)
Samuel Brown <s_d_j_brown@hotmail.com>
Examples
data(dolomedes)
subs <- titv(dolomedes)
#Transversions
subs[upper.tri(subs)]
tv <- t(subs)
tv <- tv[lower.tri(tv)]
#Transitions
ti <- subs[lower.tri(subs)]
#Saturation plot
doloDist <- ape::dist.dna(dolomedes)
graphics::plot(doloDist, ti, type="p", pch=19, col="blue",
main="Saturation plot of number of transitions and transversions\n
against K2P distance. Red: transversions. Blue: transitions")
graphics::points(doloDist, tv, pch=19, col="red")
[Package spider version 1.5.0 Index]