data(woodmouse)
res <- dnds(woodmouse, quiet = TRUE) # NOT correct
res2 <- dnds(woodmouse, code = 2, quiet = TRUE) # using the correct code
identical(res, res2)
## There a few N's in the woodmouse data, but this does not affect
## greatly the results:
res3 <- dnds(solveAmbiguousBases(woodmouse), code = 2, quiet = TRUE)
cor(res, res3)
## a simple example showing the usefulness of 'details = TRUE'
X <- as.DNAbin(matrix(c("C", "A", "G", "G", "T", "T"), 2, 3))
alview(X)
dnds(X, quiet = TRUE) # NaN + warnings
dnds(X, details = TRUE) # only a TV at a nondegenerate site
Run the code above in your browser using DataLab