Learn R Programming

phangorn (version 1.5-0)

dist.hamming: Pairwise Distances from Sequences

Description

dist.hamming and dist.logDet compute pairwise distances for an object of class phyDat. dist.ml fits distances for amino acid models.

Usage

dist.hamming(x, ratio = TRUE)
dist.logDet(x)
dist.ml(x, model="JC69", pairwise.deletion = FALSE, bf=NULL, Q=NULL, ...)

Arguments

x
An object of class phyDat
ratio
Compute uncorrected ('p') distance or character difference.
model
One of "JC69", "WAG", "JTT", "LG" or "Dayhoff"
pairwise.deletion
A logical indicating whether to delete the sites with missing data (or ambigious states) in a pairwise way. The default is to delete the sites with at least one missing data for all sequences.
bf
A vector of base frequencies.
Q
A vector containing the lower triangular part of the rate matrix.
...
Further arguments passed to or from other methods.

Value

  • an object of class dist

References

Lockhart, P. J., Steel, M. A., Hendy, M. D. and Penny, D. (1994) Recovering evolutionary trees under a more realistic model of sequence evolution. Molecular Biology and Evolution, 11, 605--602.

See Also

For more distance methods for nucleotide data see dist.dna

Examples

Run this code
data(Laurasiatherian)
dm1 <- dist.hamming(Laurasiatherian)
tree1 <- NJ(dm1)
dm2 <- dist.logDet(Laurasiatherian)
tree2 <- NJ(dm2)
treedist(tree1,tree2)

Run the code above in your browser using DataLab