Bioperl: repetitive DNA

Lincoln Stein lstein@cshl.org
Mon, 8 Nov 1999 09:04:26 -0500 (EST)


Probably also want to add an "o" to the modifiers so that the regexp
isn't reevaluated when it interpolates $NREPEAT:

      $seq =~ s/((.+?)\2{$NREPEAT,})/'N' x length $1/oeg;

Lincoln


Gustavo Glusman writes:
 > >I wonder if this RE is really ok, especially when I see the side effect of
 > >"matching the longest pattern" of regular expression matching
 > >between repeat numbers 2 and 3.
 > 
 > Correct. Simple modification:
 > 
 > >	$seq =~ s/((.+?)\2{$NREPEAT,})/'N' x length $1/eg;
 >                       ^-- minimal matching
 > 
 > Works quite nicely this way.
 > 
 > 
 >      ____________________________________________________________
 >      Gustavo Glusman              Founder/administrator of BioMOO
 >      Gustavo@bioinfo.weizmann.ac.il    (public PGP key available)
 >      http://bioinfo.weizmann.ac.il/Gustavo
 >         Visit BioMOO, the biologists' virtual meeting place, at
 >      ___________ http://bioinfo.weizmann.ac.il/BioMOO ___________
 > 
 > 
 > =========== Bioperl Project Mailing List Message Footer =======
 > Project URL: http://bio.perl.org/
 > For info about how to (un)subscribe, where messages are archived, etc:
 > http://www.techfak.uni-bielefeld.de/bcd/Perl/Bio/vsns-bcd-perl.html
 > ====================================================================

-- 
========================================================================
Lincoln D. Stein                           Cold Spring Harbor Laboratory
lstein@cshl.org			                  Cold Spring Harbor, NY
========================================================================
=========== Bioperl Project Mailing List Message Footer =======
Project URL: http://bio.perl.org/
For info about how to (un)subscribe, where messages are archived, etc:
http://www.techfak.uni-bielefeld.de/bcd/Perl/Bio/vsns-bcd-perl.html
====================================================================