evotools / hapbin

Efficient program for calculating Extended Haplotype Homozygosity (EHH) and Integrated Haplotype Score (iHS)
GNU General Public License v3.0
42 stars 17 forks source link

Hapbin standardised iHS values sign issue #55

Closed paolo002 closed 5 years ago

paolo002 commented 5 years ago

Hi Colin

This is Paolo again, I have used the latest version of hapbin and I have compared the values of the standardised iHS obtained by running it with same values obtained after running selscan on a same set of individuals and same chromosome. The standardised values obtained after running hapbin have opposite sign compared to those obtained by selscan. I think there is an issue with that. Still the sign is flipped. Please, can you double check?

prenderj commented 5 years ago

Hi

Selscan swapped the reference and alternative EHH relative to the original Voight paper when calculating iHS. See the lines from the paper:

Note that this definition differs slightly from that in Voight et al. (2006) https://www.ncbi.nlm.nih.gov/pmc/articles/PMC4166924/#msu211-B7, where unstandardized iHS is defined with iHH1 and iHH0 swapped.

Cheers James

On Mon, 11 Feb 2019 at 15:19, paolo002 notifications@github.com wrote:

Hi Colin

This is Paolo again, I have used the latest version of hapbin and I have compared the values of the standardised iHS obtained by running it with same values obtained after running selscan on a same set of individuals and same chromosome. The standardised values obtained after running hapbin have opposite sign compared to those obtained by selscan. I think there is an issue with that. Still the sign is flipped. Please, can you double check?

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/evotools/hapbin/issues/55, or mute the thread https://github.com/notifications/unsubscribe-auth/AHrsGtUpBS3FQP6GNpS9uBubOxkW2imwks5vMYoSgaJpZM4a0aLy .

paolo002 commented 5 years ago

Hi James Thank you very much for your reply. I understand. I double checked the raw data and selscan is calculating the iHS as log(iHH1/iHH0) instead hapbin is calculating it as log(iHH0/iHH1). That is the reason why the sign is flipped. So, just to double confirm with you, because I need be 100% sure about the sign of the iHS values because I need to identify which one of the allele, between the reference allele and the alternate one, is under selection... If Hapbin is calculating iHS as log(iHH0/iHH1) meaning Reference allele over Alternate allele, does it mean that a positive iHS value correspond to selection on Reference allele while a negative iHS value correspond to selection on Alternate allele? Is that correct?

Best Paolo