szpiech / selscan

Haplotype based scans for selection
GNU General Public License v3.0
109 stars 33 forks source link

EHH output clarification #47

Closed jkreinz closed 4 years ago

jkreinz commented 4 years ago

Hi there,

Thanks so much for this software - I've find it extremely useful in my research.

I have a clarifying question about the EHH output. I'm currently using selscan v1.2.0a but have made sure the documentation is consistent with regard to the EHH output with the newest verison. While the documentation describes 4 columns of output for EHH, my output file has 5. For e.g:

-214    -0.000089       0.404762        0.650116        0.518347
-154    -0.000061       0.404762        0.756315        0.602225
-140    -0.000057       0.404762        0.834955        0.664335
-133    -0.000055       0.404762        0.860409        0.684440
-117    -0.000052       0.404762        0.905633        0.720158
-75     -0.000042       0.753968        0.932153        0.745308
-55     -0.000036       0.753968        0.959059        0.766560
-47     -0.000032       0.753968        1.000000        0.798895
0       0.000000        1.000000        1.000000        0.012040
59      0.000089        1.000000        0.965762        0.774816
61      0.000090        0.944444        0.688323        0.555020
148     0.000104        0.944444        0.660617        0.533138
250     0.000179        0.468254        0.512098        0.410102

I would have considered the first physical distance and the second genetic distance. But then there are three remaining columns, only two of which refer to EHH for allele 1 and allele 0.

Can you please reiterate what these columns represent? Thanks, Julia

szpiech commented 4 years ago

Hello, Sorry I haven't updated this information. Indeed the first two columns are physical and genetic distance, respectively. The next two are the ehh for the haplotypes containing the '1' allele and '0' allele, respectively, and the final column should give the ehh for all the haplotypes together.

jkreinz commented 4 years ago

Great - thanks for the info!

One more question, is it possible to get the length of the haplotype used to calculate iHS? Can I calculate this manually by just looking for where EHH becomes <= 0.05?

szpiech commented 4 years ago

Unfortunately, I don't see a super simple way to do this given the ihs output of selscan.