peddy icon indicating copy to clipboard operation
peddy copied to clipboard

Ancestry composition

Open RoniHaas opened this issue 3 years ago • 1 comments

Hello,

I would appreciate your help with a question about ancestry composition.

Peddy assigns a single ancestry to each individual and gives the corresponding probability (which is the highest) for that prediction. I was wondering if there is a way to know what are the probabilities for ancestries with lower probabilities for the same individual.

For example, if Peddy predicts for an individual an AMR ancestry with a probability of 0.7, can I know what is the prediction for the left 0.3?

My goal is to create a plot, based on that idea for example: image

Thank you!

RoniHaas avatar Dec 03 '22 05:12 RoniHaas

Hi, this could be done by not simply taking the max here: https://github.com/brentp/peddy/blob/master/peddy/pca.py#L82 I would accept a PR that reports the other probabilities. The interpretation would not be the same as admixture, but might be informative as a proxy.

brentp avatar Dec 05 '22 16:12 brentp