Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

Re: non-exact regexp matches

by Abigail-II (Bishop)
on Jun 23, 2004 at 20:57 UTC ( #369175=note: print w/ replies, xml ) Need Help??


in reply to Re^2: non-exact regexp matches
in thread non-exact regexp matches

Will this do?

use re 'eval'; no strict 'refs'; if (/(A)?(C)?(C)?(A)?(A)?(C)?([ACGTacgtNn]{6})?(CTA[ACGTacgtNn]{1} +)? (A)?(T)?(G)?([ACGTacgtNn]{1,2})?(G)?(A)?(T)?(G)?(T)?(T)? (?(?{17 <= grep {defined $$_} 1 .. 19})|(?!))/x) { ... }

Abigail


Comment on Re: non-exact regexp matches
Download Code
Replies are listed 'Best First'.
Re^2: non-exact regexp matches
by Anonymous Monk on Jun 25, 2004 at 15:14 UTC
    Hi, I tested your program on the following sequence:
    ACCAACCGGATTCTAGATGCAGATGTTGAAGATT # works OK. Change the second C for a G: AGCAACCGGATTCTAGATGCAGATGTTGAAGATT # Doesn't work.
    I'm looking over your regexp... bu it'll take me a while to figure it out. Thanks for the help. Vince
      That's because Abigail-II's regex only handles the case of deletions. To support insertions and modifications, you need a more robust approach.
      _____________________________________________________
      Jeff[japhy]Pinyan: Perl, regex, and perl hacker, who'd like a job (NYC-area)
      s++=END;++y(;-P)}y js++=;shajsj<++y(p-q)}?print:??;
        Thanks Jeff. I think I read up some more on advanced regexp before i get in over my head. Vince

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others browsing the Monastery: (13)
As of 2015-07-29 18:00 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (267 votes), past polls