Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
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.

Replies are listed 'Best First'.
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?
[Corion]: holli: Ooof :)
[hippo]: Cut should beless than 20% after tax, though. :-)
[Corion]: hippo: Yeah, but at least two years ago, it still was close enough to 20% cut
[Corion]: But I have a very positive experience with a four day workweek and a three day weekend. I can't easily go back though to full money.
[Corion]: That is easy without having to pay for a house, a wife or children though. If I had any of these, or any two of these, the decision wouldn't be that easy.
[ambrus]: wait. I understand no wife and children, but how do you not have to pay for a house?
[hippo]: I had a low-paid job about 20 years ago and seriously considered going down to a 3-day week. Would have worked 60% of the time for about 80% of the cash.
[Corion]: ambrus: Well, I pay rent, but don't own a house with variable/ unforeseeable costs

How do I use this? | Other CB clients
Other Users?
Others studying the Monastery: (10)
As of 2017-09-21 15:13 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    During the recent solar eclipse, I:









    Results (249 votes). Check out past polls.

    Notices?