Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

Re: non-exact regexp matches

by Abigail-II (Bishop)
on Jun 23, 2004 at 20:57 UTC ( [id://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

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
Domain Nodelet?
Node Status?
node history
Node Type: note [id://369175]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others browsing the Monastery: (3)
As of 2024-04-19 21:25 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found