Skip to contents

The JC69 distance is calculated as -0.75 * log(1 - 4 * p / 3), where p is the sum of the probabilities of the alignment. See WIKI for more details.

Usage

JC69_distance(train_parameters)

Arguments

train_parameters

A list containing the probabilities of the alignment.

Value

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

Note

Here, the probability ranges from 0 to 1. The list input can contain other information, but the function will only use the name in this format probability_REF_ALT

Examples

parameters <- readTrainFile(system.file("extdata/example.train", package = "GenomicBreaks"))
JC69_distance(parameters)
#> [1] 0.0161481