in reply to Re^3: fuzzy match: trim sequences outside of the forward and reverse primer set.
in thread fuzzy match: trim sequences outside of the forward and reverse primer set.

I don't think it returns the fuzzy matched string, but the sequence containing the string. therefore, I have no way to know what was the string found. Any more suggestions?

  • Comment on Re^4: fuzzy match: trim sequences outside of the forward and reverse primer set.

Replies are listed 'Best First'.
Re^5: fuzzy match: trim sequences outside of the forward and reverse primer set.
by grizzley (Chaplain) on Nov 12, 2012 at 10:03 UTC

    Not much. I though perl package will behave in perl-ish way returning matched part of the string as well as storing somewhere "before-string" and "after-string". What remains is to implement the fuzzy-matching yourself.

    If this fuzzy matching would be defined by number of differences between strings then maybe Text::Levenshtein is of use? I mean iterating in simple

    for (0..length($str)-$len_of_match) { if(Text::Levenshtein::distance(substr($str, $_, $len_of_match), matc +hstring) <= $differences_limit) { $found = true; last } }