bidirectionalKL: Kullback-Leibler Divergence Calculation for Genetic Markers
Description
This function calculates the Kullback-Leibler divergence for shared genetic markers
between two populations, considering allele frequencies. It normalizes data, adjusts zero frequencies,
and calculates divergence in both directions.
Usage
bidirectionalKL(data1, data2, minFreq = 1e-10)
Value
A list containing the Kullback-Leibler divergence from data1 to data2 and vice versa.
Arguments
data1
DataFrame with allele frequencies for the first population.
data2
DataFrame with allele frequencies for the second population.
minFreq
Minimum frequency to be considered for unobserved or poorly observed alleles.