
l’algorithme de pruning se base sur un tableau de distance au déscendent génotypé le plus proche:

\[ \widehat{MAF} = {1\over 2} P(X = 1|Y) + P(X =2|Y) \]
def ReEstimateFoundersAnterior(samplesProbalog):
samplesProba = np.exp(samplesProbalog)
# shape (nloci,nGenotype,nfounders)
# Estimation of MAF
## we apply coefficient based on numbers of alt alleles
estimateMAF = samplesProba * np.array([0, 0.5, 1])[None, :, None]
estimateMAF = np.sum(estimateMAF, axis=(1, 2)) / samplesProba.shape[-1]
estimateMAF = np.log(estimateMAF)
log_1_minus_MAF = np.log(1 - np.exp(estimateMAF.clip(max=np.log(1 - 1e-10))))
# Reestimate founders anterior probabilities
reestimated_anterior_freq = np.zeros_like(
samplesProbalog[..., 0, None]
) # <- shape(nloci,nGenotype,1)
reestimated_anterior_freq[:, 0, 0] = 2 * log_1_minus_MAF # log((1-MAF)^2)
reestimated_anterior_freq[:, 1, 0] = (
np.log(2) + estimateMAF + log_1_minus_MAF
) # log(2 * MAF * (1-MAF))
reestimated_anterior_freq[:, 2, 0] = 2 * estimateMAF # log(MAF^2)
return reestimated_anterior_freqSur le jeux de donnée simulé (avec conservation de tous les génotypages) on a pu traquer lors des différent cycles du peeling itératif

Point hébdomadaire semaine 8.

Pied de page