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