[Bio] / Sprout / Sapling.pm Repository:
ViewVC logotype

Diff of /Sprout/Sapling.pm

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.17, Wed Aug 19 17:09:03 2009 UTC revision 1.18, Thu Aug 27 19:54:22 2009 UTC
# Line 261  Line 261 
261      return $retVal;      return $retVal;
262  }  }
263    
264    =head3 Assignment
265    
266        my $assignment = $sapling->Assignment($fid);
267    
268    Return the functional assignment for the specified feature.
269    
270    =over 4
271    
272    =item fid
273    
274    FIG ID of the desired feature.
275    
276    =item RETURN
277    
278    Returns the functional assignment of the specified feature, or C<undef>
279    if the feature does not exist.
280    
281    =back
282    
283    =cut
284    
285    sub Assignment {
286        # Get the parameters.
287        my ($self, $fid) = @_;
288        # Get the functional assignment.
289        my ($retVal) = $self->GetFlat("Feature", "Feature(id) = ?", [$fid], 'function');
290        # Return the result.
291        return $retVal;
292    }
293    
294    
295  =head3 ComputeDNA  =head3 ComputeDNA
296    
# Line 758  Line 788 
788      return @retVal;      return @retVal;
789  }  }
790    
791    =head3 IsDeletedFid
792    
793        my $flag = $sapling->IsDeletedFid($fid);
794    
795    Return TRUE if the specified feature is B<not> in the database, else
796    FALSE.
797    
798    =over 4
799    
800    =item fid
801    
802    FIG ID of the relevant feature.
803    
804    =item RETURN
805    
806    Returns TRUE if the specified feature is in the database, else FALSE.
807    
808    =back
809    
810    =cut
811    
812    sub IsDeletedFid {
813        # Get the parameters.
814        my ($self, $fid) = @_;
815        # Check for the feature. If the feature does not exist, we'll get an
816        # undefined value (FALSE). If it does, we'll get the feature ID itself
817        # (TRUE).
818        my ($retVal) = $self->GetFlat("Feature", "Feature(id) = ?", [$fid], 'id');
819        # Return FALSE if the feature was found, TRUE if it was not found.
820        return ($retVal ? 0 : 1);
821    }
822    
823    
824  =head3 GenomeHash  =head3 GenomeHash
825    

Legend:
Removed from v.1.17  
changed lines
  Added in v.1.18

MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3