[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.659, Sun Feb 17 19:29:37 2008 UTC revision 1.660, Mon Feb 18 21:01:30 2008 UTC
# Line 1  Line 1 
1    
2  # -*- perl -*-  # -*- perl -*-
3  ########################################################################  ########################################################################
4  # Copyright (c) 2003-2007 University of Chicago and Fellowship  # Copyright (c) 2003-2007 University of Chicago and Fellowship
# Line 4035  Line 4036 
4036          $relational_db_response = $rdbH->SQL("SELECT genome  FROM genome");          $relational_db_response = $rdbH->SQL("SELECT genome  FROM genome");
4037      }      }
4038      my @genomes = sort { $a <=> $b } map { $_->[0] } @$relational_db_response;      my @genomes = sort { $a <=> $b } map { $_->[0] } @$relational_db_response;
4039      return grep { -d "$FIG_Config::organisms/$_" } @genomes;      return @genomes;
4040  }  }
4041    
4042  sub genome_list {  sub genome_list {
# Line 8910  Line 8911 
8911  =cut  =cut
8912    
8913  sub translated_function_of {  sub translated_function_of {
8914      my($self,$id) = @_;      my($self,$id,$user) = @_;
8915    
8916      my $func = $self->function_of($id);      my $func = $self->function_of($id,$user);
8917      if ($func)      if ($func)
8918      {      {
8919          $func = $self->translate_function($func);          $func = $self->translate_function($func);
# Line 15701  Line 15702 
15702      return $ans;      return $ans;
15703  }  }
15704    
15705    =head3 taxonomy_list
15706    
15707    usage: $taxonomy = $fig->taxonomy_list()
15708    
15709    Returns the taxonomy list of all organisms in a hash ref.  Gives the taxonomy down to
15710    genus and species.
15711    
15712    =cut
15713    
15714    sub taxonomy_list {
15715        my($self) = @_;
15716        my $taxonomy = $self->cached('_taxonomy');
15717    
15718        if (keys(%$taxonomy) == 0)
15719        {
15720            my $rdbH = $self->db_handle;
15721            my $relational_db_response = $rdbH->SQL("SELECT genome,taxonomy  FROM genome");
15722            my $pair;
15723            foreach $pair (@$relational_db_response)
15724            {
15725                $taxonomy->{$pair->[0]} = $pair->[1];
15726            }
15727        }
15728        return $taxonomy;
15729    }
15730    
15731    
15732  =head3 is_bacterial  =head3 is_bacterial
15733    
15734  usage: $fig->is_bacterial($genome)  usage: $fig->is_bacterial($genome)

Legend:
Removed from v.1.659  
changed lines
  Added in v.1.660

MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3