def _to_dosage(probs: ArrayLike) -> ArrayLike:
    'Calculate the dosage from genotype likelihoods (probabilities)'
    assert (probs.shape[(- 1)] == 3), f'Expecting genotype (trailing) dimension of size 3, got array of shape {probs.shape}'
    return (probs[(..., 1)] + (2 * probs[(..., 2)]))
Calculate the dosage from genotype likelihoods (probabilities)
def _to_dosage(probs: ArrayLike) -> ArrayLike:
    
    assert (probs.shape[(- 1)] == 3), f'Expecting genotype (trailing) dimension of size 3, got array of shape {probs.shape}'
    return (probs[(..., 1)] + (2 * probs[(..., 2)]))