We can use the internal Python integration testing module to compare our rust calculations to tskit.
The tskit f2 is not symmetrical when data have > 2 alleles (see tskit-dev/tskit#2919).
So we should generate data with msprime using the "infinitely many sites" approach that results in all variable sites having exactly 2 alleles.
When multiple alleles are present, our f2 calculation is equal to the mean of the tskit calculations ( f2(a,b) + f2(b,a) )/2.
We can use the internal Python integration testing module to compare our rust calculations to tskit.
The tskit f2 is not symmetrical when data have > 2 alleles (see tskit-dev/tskit#2919).
So we should generate data with msprime using the "infinitely many sites" approach that results in all variable sites having exactly 2 alleles.
When multiple alleles are present, our f2 calculation is equal to the mean of the tskit calculations ( f2(a,b) + f2(b,a) )/2.