data(Laurasiatherian)
laura <- as.DNAbin(Laurasiatherian)
dm <- dist.p(Laurasiatherian, "polymorphism")
########################################################
# Dealing with indel 2ISPs
# These can be coded using an "x" in the alignment. Note
# that as.character usage in the read.dna() function.
#########################################################
cat("3 5",
"No305 ATRA-",
"No304 ATAYX",
"No306 ATAGA",
file = "exdna.txt", sep = "\n")
(ex.dna <- read.dna("exdna.txt", format = "sequential", as.character=TRUE))
dat <- phyDat(ex.dna, "USER", levels=unique(as.vector(ex.dna)))
dist.p(dat)
unlink("exdna.txt")
Run the code above in your browser using DataLab