Open jeromekelleher opened 4 years ago
Proposal was, for coalescent simulations:
p
which is the proportion of reproductive adults that are male4 * (p * (1 - p)) / (2 - p)
(note if p=1/2
this is 2/3
)(Since: 1/(2Ne)
is the chance of coalescence; for two X chromosomes to coalesce they must pick the same sex parent (probability 1/4
); then, if female, they must pick the same female (prob 1/Nf
) and then both pick the same X chromosome (1/2
); if male, they must only pick the same male (prob 1/Nm
); putting this together,
(prob of coal) = (1/4) * (1/(2Nf) + 1/Nm) = (1/8) * (2 Nf + Nm) / (Nf Nm)
and putting in Nm = p N
and Nf = (1-p)N
we get that
(prob of coal) = (1/4) * ( (2-p) / (p (1-p)) ) * (1/(2N))
so we need to set Ne so this is equal to 1/(2Ne)
; which is obtained if Ne = (4 p (1-p) /(2 - p)) * N
.)
However: if we're really adding this new parameter, p
, we should rescale the usual coalescence rate as well! I kinda think we should just stick with p=1/2
.
I would add two more things to implement when needed.
This is what I got for p = 1/2.
X-chromosome coalescent rate is 2 / (3 Ne).
(2 / 3 Ne) / (1 / (2 Ne) is 4/3. So Ne_X = 3/4 Ne_A.
Looking into the past, you have three types of X-chromosomes.
The frequencies of these are p/(2-p), (1-p)/(2-p), and (1-p)/(2-p). Therefore,
Putting this together to total rate of coalescence is
[(1-p)/(2-p)]^2 (1/Nm) + [1/(2-p)]^2 (1 / (2 Nf))
The inverse of this is 2N*p(1-p)(2-p) / (1- 2 p(1-p)) and thus the correction factor for Ne is
p(1-p)(2-p) / (1-2 p(1-p))
Whoops - good point - I forgot to reweight by sex.
Adding notes from @mathbionerd's stdpopsim talk just now:
In the meeting 2020-01-14 we discuss the current (mis)handling of sex chromosomes. We're not handling these properly at the moment in the shipped software, so we need to do something about it. Options discussed:
We decided on 2 initially, followed by 3.