in reply to homemade blat: need help with reverse string.

I think you are doing a bunch of extra work. You populate %oligo with every possible $query-sized substrand, and match by hash key. It would have to be easier to do basic string matching.

Instead of building those hashes, simply compare $query and $revcomp to the substring within your for loop, report the position found at that time, and count up how many matches to report at the end. Better still, as suggested, use the index function and let perl do the work of matching the string.

Dum Spiro Spero
  • Comment on Re: homemade blat: need help with reverse string.