[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.147, Fri Aug 27 21:55:57 2004 UTC revision 1.148, Tue Sep 7 02:54:16 2004 UTC
# Line 2542  Line 2542 
2542  =cut  =cut
2543    
2544  sub by_alias {  sub by_alias {
2545      my($self,$alias) = @_;      my($self,$alias,$genome) = @_;
2546      my($rdbH,$relational_db_response,$peg);      my($rdbH,$relational_db_response,$peg);
2547    
2548        my $genomeQ = $genome ? quotemeta $genome : "";
2549      if ($alias =~ /^fig\|\d+\.\d+\.peg\.\d+$/) { return $alias }      if ($alias =~ /^fig\|\d+\.\d+\.peg\.\d+$/) { return $alias }
2550    
2551      $peg = "";      $peg = "";
# Line 2554  Line 2555 
2555      {      {
2556          $peg = $relational_db_response->[0]->[0];          $peg = $relational_db_response->[0]->[0];
2557      }      }
2558        else
2559        {
2560            my @poss = grep { $_ =~ /^fig\|/ } map { $_->[0] } $self->mapped_prot_ids($alias);
2561            if ($genomeQ)
2562            {
2563    
2564                @poss = grep { $_ =~ /^fig\|$genomeQ/ } @poss;
2565            }
2566    
2567            if (@poss == 1)
2568            {
2569                $peg = $poss[0];
2570            }
2571        }
2572      return $peg;      return $peg;
2573  }  }
2574    

Legend:
Removed from v.1.147  
changed lines
  Added in v.1.148

MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3