uqrmaie1 / admixtools

https://uqrmaie1.github.io/admixtools
74 stars 14 forks source link

Issue with f3 and f4 #71

Open freshspaceoctopus opened 5 months ago

freshspaceoctopus commented 5 months ago

Hello, I was curious about some Issues that I have encountered.

  1. Using pseudohaploid individual on the pop1 of f3 results into NA. When the population 1 is only one individual and is pseudohaploid, the f3 results always return NA for me.

  2. f4(A,B; A,C) and f3(A;B,C) results do not agree To my understanding, the two results should at least agree in direction. However, the two do not agree (One being positive, other being negative).

Thanks in advance!

freshspaceoctopus commented 5 months ago

OK, so I seemed to have glossed over some important parameters: outgroupmode = F and apply_cor = T.. Setting them as T and F fixed my 1 individual problem. I believe this is intentional since one individual populations have no heterozygosity? It would be nice if this was documented somewhere.

uqrmaie1 commented 5 months ago

Setting them as T and F fixed my 1 individual problem. I believe this is intentional since one individual populations have no heterozygosity?

Yes, this is intentional. f3 estimates are likely biased if the first population is a single pseudodiploid sample, and I think it's better if the bias correction isn't automatically turned off in that case. Setting outgroupmode = F and apply_cor = T should also make the estimates of f4(A,B; A,C) and f3(A;B,C) match.

I updated the documentation of the f3() function, hopefully it's clearer now.