[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.449, Wed Mar 22 16:31:15 2006 UTC revision 1.450, Thu Mar 23 04:51:54 2006 UTC
# Line 8986  Line 8986 
8986   return map {$_->[0]} @$res;   return map {$_->[0]} @$res;
8987  }  }
8988    
8989    =head3 get_peg_keys_for_genome
8990    
8991    Get all the keys that apply just to pegs from a specified genome.
8992    This method takes a genome id as an argument and returns an array.
8993    
8994    =cut
8995    
8996    sub get_peg_keys_for_genome {
8997        my ($self, $genome)=@_;
8998        my $rdbH = $self->db_handle;
8999    
9000        # An error check to make sure that we are operating on the new version of attributes
9001        #  # If we are not, we will print an error and then return. Otherwise continue
9002        eval {$rdbH->SQL("SELECT genome,ftype,id,tag,val,url FROM attribute LIMIT 1")};
9003        if ($@) {return []}
9004        #if ($@) {print STDERR "Please rerun load_attributes to install the newest set of attributes\n"; return []}
9005    
9006        my $res=$rdbH->SQL("SELECT genome,ftype,id,tag,val,url from attribute where (genome = '$genome' and ftype = 'peg')");
9007    
9008        # the following line takes the first 3 elements from each array and puts them back
9009        # # to be a feature or genome using join_attribute_oid and then puts them back in the array.
9010        map {unshift @$_, $self->join_attribute_oid(splice(@$_, 0, 3))} @$res;
9011        return @{$res};
9012    }
9013    
9014    
9015  =head3 key_info  =head3 key_info
9016    
9017  Access a hash of key information. The data that are returned are currently:  Access a hash of key information. The data that are returned are currently:

Legend:
Removed from v.1.449  
changed lines
  Added in v.1.450

MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3