[Bio] / FigKernelPackages / SeedUtils.pm Repository:
ViewVC logotype

Diff of /FigKernelPackages/SeedUtils.pm

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

revision 1.2, Tue Jun 30 20:11:54 2009 UTC revision 1.3, Wed Jul 15 23:37:46 2009 UTC
# Line 23  Line 23 
23      use Tracer;      use Tracer;
24      use base qw(Exporter);      use base qw(Exporter);
25    
26      our @EXPORT = qw(create_fasta_record rev_comp);      our @EXPORT = qw(create_fasta_record rev_comp genome_of);
27    
28  =head1 SEED Utility Methods  =head1 SEED Utility Methods
29    
# Line 143  Line 143 
143      }      }
144  }  }
145    
146    =head3 genome_of
147    
148        my $genomeID = genome_of($fid);
149    
150    Return the Genome ID embedded in the specified FIG feature ID.
151    
152    =over 4
153    
154    =item fid
155    
156    Feature ID of interest.
157    
158    =item RETURN
159    
160    Returns the genome ID in the middle portion of the FIG feature ID. If the
161    feature ID is invalid, this method returns an undefined value.
162    
163    =back
164    
165    =cut
166    
167    sub genome_of {
168        # Get the parameters.
169        my ($fid) = @_;
170        # Declare the return variable.
171        my $retVal;
172        # Parse the feature ID.
173        if ($fid =~ /^fig\|(\d+\.\d+)\./) {
174            $retVal = $1;
175        }
176        # Return the result.
177        return $retVal;
178    }
179    
180    
181  1;  1;

Legend:
Removed from v.1.2  
changed lines
  Added in v.1.3

MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3