evotools / hapbin

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

Freq equal 0 to all SNPs #58

Closed dexcardos closed 4 years ago

dexcardos commented 5 years ago

Hi there, The following line gave me the third column "Freq", with 0s only. Any clues on why ?

ihsbin -d teste.impute.hap -m teste.map -f 0.01 -s 20000 -e 50000 -b 10 -a -o teste2.

A further question. Is there some function equivalent to the trunc-ok of Selscan, to impose that iHS to be computed to SNPs on the borders of the chromosome, where EHH decay reaches the end of a sequence before reaching the cutoff ?

Cheers

lauterbur commented 5 years ago

I am seeing this as well with the test data and my simulated data. Using ./build/ihsbin --hap data/1000GP_Phase3.GBR.chr22.hap --map data/chr22.map generates values for all of the statistic columns, but the Freq column has only zeroes.

lauterbur commented 4 years ago

@dexcardos I made a modification to ihs_mpi.cpp and ihs.cpp that prints the frequencies correctly, you can find the fork here: https://github.com/lauterbur/hapbin

camaclean commented 4 years ago

Sorry I've been a bit busy lately.

What OS are you running on? I can't reproduce the error. The frequency gets set in IhsScore and seems to be working just fine for me. If there's a problem, that's where it should be fixed rather than accessing another large data structure unnecessarily, so the patch is to the wrong location.

camaclean commented 4 years ago

Found the problem. Pull #53 never got merged. I fixed this issue last year. @npch or @prenderj, can you please merge Pull #53? Reject #59 as #53 fixes the right place.

prenderj commented 4 years ago

Sorry must have missed this. Have now merged it and checked it and now getting frequencies

On Wed, 23 Oct 2019 at 21:36, camaclean notifications@github.com wrote:

Found the problem. Pull #53 https://github.com/evotools/hapbin/pull/53 never got merged. I fixed this issue last year. @npch https://github.com/npch or @prenderj https://github.com/prenderj, can you please merge Pull #53 https://github.com/evotools/hapbin/pull/53?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/evotools/hapbin/issues/58?email_source=notifications&email_token=AB5OYGTXKTHA65ZYLQONXRLQQCYU7A5CNFSM4IXCB5GKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOECCZHGA#issuecomment-545624984, or unsubscribe https://github.com/notifications/unsubscribe-auth/AB5OYGVOBRTIESG45GYALLTQQCYU7ANCNFSM4IXCB5GA .

dexcardos commented 4 years ago

Sorry must have missed this. Have now merged it and checked it and now getting frequencies On Wed, 23 Oct 2019 at 21:36, camaclean @.***> wrote: Found the problem. Pull #53 <#53> never got merged. I fixed this issue last year. @npch https://github.com/npch or @prenderj https://github.com/prenderj, can you please merge Pull #53 <#53>? — You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub <#58?email_source=notifications&email_token=AB5OYGTXKTHA65ZYLQONXRLQQCYU7A5CNFSM4IXCB5GKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOECCZHGA#issuecomment-545624984>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AB5OYGVOBRTIESG45GYALLTQQCYU7ANCNFSM4IXCB5GA .

Many thanks! I'll try to use this tool again.