
dist.p(x, cost="polymorphism", ignore.indels=TRUE)
dist
.
Bailey, C. D., T. G. Carr, S. A. Harris, and C. E. Hughes. (2003) Characterization of angiosperm nrDNA polymorphism, paralogy, and pseudogenes. Molecular Phylogenetics and Evolution 29, 435--455.
Goeker, M., and G. Grimm. (2008) General functions to transform associate data to host data, and their use in phylogenetic inference from sequences with intra-individual variability. BMC Evolutionary Biology, 8:86.
Potts, A.J., T.A. Hedderson, and G.W. Grimm. (2014) Constructing phylogenies in the presence of intra-individual site polymorphisms (2ISPs) with a focus on the nuclear ribosomal cistron. Systematic Biology, 63, 1--16
dist.dna
, dist.hamming
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)
Run the code above in your browser using DataLab