[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.144, Mon Aug 23 18:58:54 2004 UTC revision 1.145, Tue Aug 24 22:12:17 2004 UTC
# Line 2898  Line 2898 
2898    
2899      $prot =~ s/^([^\|]+\|[^\|]+)\|.*$/$1/;      $prot =~ s/^([^\|]+\|[^\|]+)\|.*$/$1/;
2900      my $rdbH = $self->db_handle;      my $rdbH = $self->db_handle;
2901      my $relational_db_response = $rdbH->SQL("SELECT slen FROM protein_sequence_seeks      my $relational_db_response = $rdbH->SQL("SELECT slen,seek FROM protein_sequence_seeks
2902                                               WHERE  id = \'$prot\' ");                                               WHERE  id = \'$prot\' ");
2903    
2904      return (@$relational_db_response == 1) ? $relational_db_response->[0]->[0] : undef;      my @vals = sort { $b->[1] <=> $a->[1] } @$relational_db_response;
2905        return (@vals > 0) ? $vals[0]->[0] : undef;
2906  }  }
2907    
2908    
# Line 2929  Line 2930 
2930    
2931      $relational_db_response = $rdbH->SQL("SELECT fileno, seek, len FROM protein_sequence_seeks WHERE  id = \'$id\' ");      $relational_db_response = $rdbH->SQL("SELECT fileno, seek, len FROM protein_sequence_seeks WHERE  id = \'$id\' ");
2932    
2933      if ($relational_db_response && @$relational_db_response == 1)      if ($relational_db_response && @$relational_db_response > 0)
2934      {      {
2935          ($fileN,$seek,$ln) = @{$relational_db_response->[0]};          my @vals = sort { $b->[1] <=> $a->[1] } @$relational_db_response;
2936            ($fileN,$seek,$ln) = @{$vals[0]};
2937          if (($fh = $self->openF($self->N2file($fileN))) &&          if (($fh = $self->openF($self->N2file($fileN))) &&
2938               ($ln > 10))               ($ln > 10))
2939          {          {

Legend:
Removed from v.1.144  
changed lines
  Added in v.1.145

MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3