evotools / hapbin

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

Is the locus ID same as that of rsID? #39

Closed shreyashruti closed 6 years ago

shreyashruti commented 6 years ago

I want to know if the locus ID mentioned in input file format is same as that of rsID?

prenderj commented 6 years ago

Hi

This can be any unique id. As some variants may not have an rsID I normally just use consecutive numbers and map these to those with rsIds afterwards. Whatever though you prefer.

shreyashruti commented 6 years ago

So if I want to calculate EHH score of a particular SNP, the code to be used for example: ehhbin --hap 1000GP_Phase3.GBR.chr22.hap --map chr22.map --locus someid What should i give in place of someid? Can it be any random number?

Also when I am trying to calculate ehh score for a SNP using above code, i am getting two errors: " WARNING: Map file has more loci than hap file! no locus with the id: someid "

What does this mean? Sorry if I am not making much sense, I am new to this. Thanks alot for the previous reply. :) Regards Shreya

prenderj commented 6 years ago

Hi Shreya

If you unpack the relevant files in the data folder and run the example on the readme from there i.e.:

../build/ehhbin --hap 1000GP_Phase3.GBR.chr22.hap --map chr22.map --locus 140465 > 140465_EHH.txt

Then you should see it working. If you grep for this locus number:

grep 140465 chr22.map

You should see there is a row/variant with this id in the second column (at position 21283618). You are calculating EHH around this variant.

So when specifying the locus you need to specify the id in the second column of the map file corresponding to the variant of interest. Your warning suggest your map and hap files don't have the same numbers of rows/variants. If run:

wc -l 1000GP_Phase3.GBR.chr22.hap wc -l chr22.map

The two numbers should agree.

shreyashruti commented 6 years ago

Hi Now I got it. Thanks alot. I really appreciate it. @prenderj :)