Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

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

by grizzley (Chaplain)
on Nov 09, 2012 at 07:46 UTC ( #1003076=note: print w/replies, xml ) Need Help??


in reply to Re^2: 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.

In that case there are at least two possibilities:
    1. If Bio::Perl can do match with wildcards, you can do fuzzy match 'agct.*'
    2. Do fuzzy match with Bio::Perl and use returned matched string to do perfect match or better substitute: s/.*?(?=$returnedstring)//
  • Comment on Re^3: fuzzy match: trim sequences outside of the forward and reverse primer set.
  • Download Code

Replies are listed 'Best First'.
Re^4: fuzzy match: trim sequences outside of the forward and reverse primer set.
by lrl1997 (Novice) on Nov 09, 2012 at 22:43 UTC

    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?

      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 } }

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1003076]
help
Chatterbox?
[choroba]: just one of its angles, in fact
[LanX]: <|--
[choroba]: Reminds me of an old joke about an orchestra...
erix imagines that in a true Lancs accent
[choroba]: so a Czech orchestra rehearses a new piece by a German composer
LanX LOL of the day ... the Turkish Anonymous Alcoholics stopped their "No to alcohol" campaign for political reasons ...
LanX omg my browser is posting again on its own ...
[LanX]: choroba: GREAT JOKE! xD

How do I use this? | Other CB clients
Other Users?
Others chanting in the Monastery: (5)
As of 2017-03-27 11:48 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Should Pluto Get Its Planethood Back?



    Results (319 votes). Check out past polls.