[Bio] / FigKernelPackages / FIG.pm Repository:
ViewVC logotype

Diff of /FigKernelPackages/FIG.pm

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.97, Thu May 27 18:22:11 2004 UTC revision 1.98, Fri May 28 19:27:00 2004 UTC
# Line 1117  Line 1117 
1117      @fxs = keys(%$fxs);      @fxs = keys(%$fxs);
1118      if (defined($fh = new FileHandle "<$file"))      if (defined($fh = new FileHandle "<$file"))
1119      {      {
1120          if (@fxs >= 205)          if (@fxs >= 50)
1121          {          {
1122              @fxs = sort { $fxs->{$a}->[1] <=> $fxs->{$b}->[1] } @fxs;              @fxs = sort { $fxs->{$a}->[1] <=> $fxs->{$b}->[1] } @fxs;
1123              $x = $fxs->{$fxs[0]};              $x = $fxs->{$fxs[0]};
# Line 2754  Line 2754 
2754                               ($_->[10] =~ /^[0-9.e-]+$/)                               ($_->[10] =~ /^[0-9.e-]+$/)
2755                           }                           }
2756                           map  { [split(/\t/,$_),"blastp"] }                           map  { [split(/\t/,$_),"blastp"] }
2757                           split(/\n/,$readC);                           @$readC;
2758    
2759          @lines = sort { $a->[10] <=> $b->[10] } @lines;          @lines = sort { $a->[10] <=> $b->[10] } @lines;
2760    
# Line 2779  Line 2779 
2779      my($piece,$readN);      my($piece,$readN);
2780    
2781      seek($fh,$seek,0);      seek($fh,$seek,0);
2782      my @pieces = ();      my @lines = ();
2783        my $leftover = "";
2784      while ($ln > 0)      while ($ln > 0)
2785      {      {
2786          my $ln1 = ($ln <= 10000) ? $ln : 10000;          my $ln1 = ($ln <= 10000) ? $ln : 10000;
2787          $readN = read($fh,$piece,$ln1);          $readN = read($fh,$piece,$ln1);
2788          ($readN == $ln1)          ($readN == $ln1)
2789              || confess "could not read the block of sims at $seek for $ln1 characters; $readN actually read";              || confess "could not read the block of sims at $seek for $ln1 characters; $readN actually read";
2790          push(@pieces,$piece);          my @tmp = split(/\n/,$piece);
2791            if ($leftover)
2792            {
2793                $tmp[0] = $leftover . $tmp[0];
2794            }
2795    
2796            if (substr($piece,-1) eq "\n")
2797            {
2798                $leftover = "";
2799            }
2800            else
2801            {
2802                $leftover = pop @tmp;
2803            }
2804            push(@lines,@tmp);
2805          $ln -= 10000;          $ln -= 10000;
2806      }      }
2807      return join("",@pieces);      if ($leftover) { push(@lines,$leftover) }
2808        return \@lines;
2809  }  }
2810    
2811    

Legend:
Removed from v.1.97  
changed lines
  Added in v.1.98

MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3