[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.494, Sat Jul 1 21:16:52 2006 UTC revision 1.495, Thu Jul 13 06:50:08 2006 UTC
# Line 5527  Line 5527 
5527    
5528  =head3 all_features  =head3 all_features
5529    
5530  usage: $fig->all_features($genome,$type)  C<< my @fidList = $fig->all_features($genome,$type); >>
5531    
5532  Returns a list of all feature IDs of a specified type in the designated genome.  You would  Returns a list of all feature IDs of a specified type in the designated genome.  You would
5533  usually use just  usually use just
# Line 5537  Line 5537 
5537    
5538  which simply invoke this routine.  which simply invoke this routine.
5539    
5540    =over 4
5541    
5542    =item genome
5543    
5544    ID of the genome whose features are desired.
5545    
5546    =item type (optional)
5547    
5548    Type of feature desired (peg, rna, etc.). If omitted, all features are returned.
5549    
5550    =item RETURN
5551    
5552    Returns a list of the IDs for the desired features.
5553    
5554    =back
5555    
5556  =cut  =cut
5557    
5558  sub all_features {  sub all_features {
5559      my($self,$genome,$type) = @_;      my($self,$genome,$type) = @_;
5560    
5561      my $rdbH = $self->db_handle;      my $rdbH = $self->db_handle;
5562      my $relational_db_response = $rdbH->SQL("SELECT id FROM features WHERE  (genome = \'$genome\' AND (type = \'$type\'))");      my $where = "(genome = \'$genome\'";
5563        if ($type) {
5564            $where .= " AND (type = \'$type\')";
5565        }
5566        $where .= ")";
5567        my $relational_db_response = $rdbH->SQL("SELECT id FROM features WHERE $where");
5568    
5569      if (@$relational_db_response > 0)      if (@$relational_db_response > 0)
5570      {      {
# Line 11793  Line 11814 
11814          map { $_->[0] } @$relational_db_response : ();          map { $_->[0] } @$relational_db_response : ();
11815  }  }
11816    
11817  =head 1 is_BRC_genome  =head3 is_BRC_genome
11818    
11819  $fig->is_BRC_genome($genome)  $fig->is_BRC_genome($genome)
11820  returns true if $genome is an BRC genome  returns true if $genome is an BRC genome
# Line 11806  Line 11827 
11827      return (-e "$FIG_Config::organisms/$org/BRC") ? 1 : 0;      return (-e "$FIG_Config::organisms/$org/BRC") ? 1 : 0;
11828  }  }
11829    
11830  =head 1 is_NMPDR_genome  =head3 is_NMPDR_genome
11831    
11832  $fig->is_NMPDR_genome($genome)  $fig->is_NMPDR_genome($genome)
11833  returns true if $genome is an NMPDR genome  returns true if $genome is an NMPDR genome

Legend:
Removed from v.1.494  
changed lines
  Added in v.1.495

MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3