News for hackers. Stuff that matters.
Re:Overlap Detection in strings, with code by rflrob on Sunday March 04, 2012 @05:52PM (#3664435)
It may be worth pointing out that the OP's appeal to the relevance to biology may not be quite so relevant. Speaking as a bioinformaticist, most of the time we're interested in matching strings with some number of mismatches. In that case, something like the Smith-Waterman algorithm is going to provide much more interesting results. Given the choice between matching 400 basepairs exactly; or 399 basepairs, followed by one mismatch, followed by 399 more basepairs, I'd much rather take the latter case, but the indexOf approach wouldn't be able to tell me that.
Re:Overlap Detection in strings, with code by cperciva on Sunday March 04, 2012 @06:02PM (#3664479)
Also, indels. Mismatches are the easy part -- in my thesis I show how, with linear-time preprocessing, you can solve the overlap problem with a constant proportion of mismatches in O(sqrt(overlap length)) time.