[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.25, Wed Jan 21 18:27:29 2004 UTC revision 1.26, Mon Jan 26 22:51:32 2004 UTC
# Line 1126  Line 1126 
1126  sub is_eukaryotic {  sub is_eukaryotic {
1127      my($self,$genome) = @_;      my($self,$genome) = @_;
1128    
1129      return ($self->taxonomy_of($genome) =~ /^Eukarota/);      return ($self->taxonomy_of($genome) =~ /^Eukaryota/);
1130  }  }
1131    
1132  =pod  =pod
# Line 3534  Line 3534 
3534  =cut  =cut
3535    
3536  sub seqs_with_role {  sub seqs_with_role {
3537      my($self,$role,$who) = @_;      my($self,$role,$who,$genome) = @_;
3538      my $relational_db_response;      my($relational_db_response,$query);
3539    
3540      $who = $who ? $who : "master";      $who = $who ? $who : "master";
3541      my $rdbH = $self->db_handle;      my $rdbH = $self->db_handle;
# Line 3549  Line 3549 
3549      {      {
3550          $who_cond = "( made_by = \'master\' OR made_by = \'$who\' OR made_by = \'unknown\')";          $who_cond = "( made_by = \'master\' OR made_by = \'$who\' OR made_by = \'unknown\')";
3551      }      }
3552      my $query = "SELECT distinct prot FROM roles  WHERE (( role = \'$role\' ) AND $who_cond )";  
3553        if (! $genome)
3554        {
3555            $query = "SELECT distinct prot FROM roles  WHERE (( role = \'$role\' ) AND $who_cond )";
3556        }
3557        else
3558        {
3559            $query = "SELECT distinct prot FROM roles  WHERE (( role = \'$role\' ) AND $who_cond AND (org = \'$genome\'))";
3560        }
3561      return (($relational_db_response = $rdbH->SQL($query)) && (@$relational_db_response >= 1)) ?      return (($relational_db_response = $rdbH->SQL($query)) && (@$relational_db_response >= 1)) ?
3562          map { $_->[0] } @$relational_db_response : ();          map { $_->[0] } @$relational_db_response : ();
3563  }  }

Legend:
Removed from v.1.25  
changed lines
  Added in v.1.26

MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3