Skip to contents

The Jukes and Cantor 1969 (JC69) distance is calculated as \(-\frac{3}{4} \ln(1 - \frac{4}{3} p )\), where \(p\) is the sum of the probabilities of the alignment. See the Wikipedia for more details.

Usage

JC69_distance(m)

Arguments

m

A matrix of counts or probabilities for bases of the target genome to be aligned to bases on the query genome. As a convenience it can also receive a list produced by the readTrainFile() function, containing this matrix.

Value

Returns a numeric value show the evolutionary distance between two genomes. the larger the value, the more different the two genomes are.

References

Jukes, T.H. & Cantor, C.R. (1969). "Evolution of protein molecules." In Mammalian Protein Metabolism (pp. 21–132). Academic Press.

Author

Zikun Yang

Examples

JC69_distance(exampleSubstitutionMatrix)
#> [1] 0.2765371