titv: Number of pairwise transitions and transversions in an...

Description Usage Arguments Value Author(s) Examples

Description

Calculates the number of pairwise transitions and transversions between sequences.

Usage

1
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

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
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 <- dist.dna(dolomedes)
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")
points(doloDist, tv, pch=19, col="red")

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