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

Diff of /Sprout/Sprout.pm

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

revision 1.55, Mon Apr 3 18:33:58 2006 UTC revision 1.56, Wed Apr 19 03:34:15 2006 UTC
# Line 1527  Line 1527 
1527    
1528  C<< my $genomeID = $sprout->GenomeOf($featureID); >>  C<< my $genomeID = $sprout->GenomeOf($featureID); >>
1529    
1530  Return the genome that contains a specified feature.  Return the genome that contains a specified feature or contig.
1531    
1532  =over 4  =over 4
1533    
1534  =item featureID  =item featureID
1535    
1536  ID of the feature whose genome is desired.  ID of the feature or contig whose genome is desired.
1537    
1538  =item RETURN  =item RETURN
1539    
1540  Returns the ID of the genome for the specified feature. If the feature is not found, returns  Returns the ID of the genome for the specified feature or contig. If the feature or contig is not
1541  an undefined value.  found, returns an undefined value.
1542    
1543  =back  =back
1544    
# Line 1547  Line 1547 
1547  sub GenomeOf {  sub GenomeOf {
1548      # Get the parameters.      # Get the parameters.
1549      my ($self, $featureID) = @_;      my ($self, $featureID) = @_;
1550      # Create a query to find the genome associated with the feature.      # Create a query to find the genome associated with the incoming ID.
1551      my $query = $self->Get(['IsLocatedIn', 'HasContig'], "IsLocatedIn(from-link) = ?", [$featureID]);      my $query = $self->Get(['IsLocatedIn', 'HasContig'], "IsLocatedIn(from-link) = ? OR HasContig(to-link) = ?",
1552                               [$featureID, $featureID]);
1553      # Declare the return value.      # Declare the return value.
1554      my $retVal;      my $retVal;
1555      # Get the genome ID.      # Get the genome ID.
# Line 2735  Line 2736 
2736      return @retVal;      return @retVal;
2737  }  }
2738    
2739    
2740    
2741  =head3 RelatedFeatures  =head3 RelatedFeatures
2742    
2743  C<< my @relatedList = $sprout->RelatedFeatures($featureID, $function, $userID); >>  C<< my @relatedList = $sprout->RelatedFeatures($featureID, $function, $userID); >>

Legend:
Removed from v.1.55  
changed lines
  Added in v.1.56

MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3