-
Notifications
You must be signed in to change notification settings - Fork 48
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
BoyerMoore Updated with example #24
Comments
Eck, that's no good. I haven't used that aspect of the library, will see if I can recreate your example |
I didn't dig into the algorithm, but could verify that I didn't need the search string to start with a * or that it always matches at the start. See these examples:
|
Okay, I can't reproduce this problem after trying a few times so will close this. Feel free to reopen if you can upload an example though. The wildcard indicates not just one character but 0-infinity of them, so if your search string is within the sequence, you will always have a 0 returned if you lead off with a |
I can't reopen, but I did get your example to work but then poking at it since my code still wasn't working i found this
appears there's some issue with the sequence constructor having lower case letters in it. It is really kind of weird the first one stops matching but the second one is fine. If I make the sequence with a toLower on your string neither matches anymore. |
here's an example where it fails. I generated 2500bp of random then a couple short bits and inserted them and it will find the individuals but the two combined with a wild card in the middle fails.
|
In testing pattern searches with BoyerMoore i can't get it to return any matches until the search string starts with a *. This also results in position 0 always being the match location. I'm going to try and do further testing but ever the simple example from the cookbook doesn't behave as i would expect.
The text was updated successfully, but these errors were encountered: