[Bioperl-l] While running without stop

Dave Messina David.Messina at sbc.su.se
Thu May 19 19:17:01 UTC 2011


I'm not familiar with these newfangled @-s and @+s, so I can't help with
that.

But the traditional way to do this is with pos():


while ( my $seq = $in->next_seq() ) {
    my $seqstring = $seq->seq;
    while ( $seqstring =~ m/(ATCGA)/g ) {
        my $end = pos($seqstring);
        my $start = $end - length($&) + 1;
        print "ATCGA commence à la position $start\nse termine juste avant
la position $end\n";
    }
}


Dave




More information about the Bioperl-l mailing list