Hi BrowserUk,
Thanks much for all your replies. I did some major refactoring of the code these past few days and was able to achieve significant improvement in speed. Major changes are:
1. split the target region into 24 chunks for 24 chromosomes (chr) and only loaded the chr of interest in memory.
2. Converted the target hash to a target array. This caused a big gain in speed.
3.Divided target region into 8 chunks 10-12.5-25-50 and so on. Checked the if the query snp is in which chunk before assigning target status.
Uma