def getUnlinkedStationary(self, popSize, theta):
one_loc_probs = one_locus_probs(popSize=popSize, theta=theta, n=self.n)
assertValidProbs(one_loc_probs)
n = self.n
leftOnes, rightOnes, bothOnes = self.numOnes(0), self.numOnes(1), self.hapCount((1,1))
joint = one_loc_probs[leftOnes] * one_loc_probs[rightOnes]
if self.exact:
joint[self.numC > 0] = 0
else:
joint = joint * scipy.misc.comb(rightOnes, bothOnes) * scipy.misc.comb(n-rightOnes, leftOnes-bothOnes) / scipy.misc.comb(n, leftOnes)
joint = joint * self.n_unfolded_versions
assertValidProbs(joint)
return joint
评论列表
文章目录