Help for this page

Select Code to Download


  1. or download this
    my @seqlen = (-1,1);    # Memoize sequence length
    my $top    = 20;        # Report this many of the top sequences
    ...
    my $mintop = 0;         # Lowest value in @top
    
    GetOptions('top=i' => \$top, 'upper=i' => \$upper);
    
  2. or download this
    for (my $start = 3; $start < $upper; $start += 2) {
        my ($n, $len) = ($start, 0);
    ...
        top($start => $len)            if $len > $mintop  and     $start <
    += $upper;
        top($n * 2 => $seqlen[$n] + 1) if   $n < $upper/2 and $seqlen[$n] 
    +> $mintop;
    }
    
  3. or download this
    sub top {
        my ($n, $len) = @_;
    ...
        pop @top if @top > $top;
        $mintop = $top[-1][1];
    }
    
  4. or download this
    real    0m0.848s
    user    0m0.835s
    sys     0m0.012s