Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

Re^13: Comparing 2 different-sized strings

by BrowserUk (Pope)
on Aug 18, 2013 at 17:03 UTC ( #1049922=note: print w/ replies, xml ) Need Help??


in reply to Re^12: Comparing 2 different-sized strings
in thread Comparing 2 different-sized strings

What I want is the following in regular expression: $hay =~ /($nee1)T[ATGC]($nee2)/

Then use the regular expression. It is perfect for that usage.

fuzzyMatch() is not designed for that type of matching.


With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.


Comment on Re^13: Comparing 2 different-sized strings
Download Code
Re^14: Comparing 2 different-sized strings
by AdrianJ217 (Novice) on Aug 18, 2013 at 17:11 UTC
    I would use the regular expression except the problem is that there may be up to 2 mismatches in $nee1 and/or $nee2. In that case I need to use the fuzzyMatch subroutine don't I? Is there a way to incorporate the fuzzyMatch subroutine, which is perfect for mismatches, into the regular expression?

      Try:

      my $hay = ...; my $nee = 'AGGATACGCCAC'; substr( $hay, $_+4, 1 ) eq 'T' and print substr( $hay, $_, length( $n +ee ) ) for fuzzyMatch( \$hay, \$nee, 3 );

      With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
      Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
      "Science is about questioning the status quo. Questioning authority".
      In the absence of evidence, opinion is indistinguishable from prejudice.
        Thank you, but does this incorporate both $nee1 and $nee2 in this case where there are 2 sequences to search for?

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1049922]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others scrutinizing the Monastery: (8)
As of 2014-08-23 13:30 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The best computer themed movie is:











    Results (173 votes), past polls