[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.35, Mon Apr 12 01:06:54 2010 UTC revision 1.36, Thu Apr 29 20:33:43 2010 UTC
# Line 1390  Line 1390 
1390      return $prot;      return $prot;
1391  }  }
1392    
1393    =head3 type_of
1394    
1395        my $type = SeedUtils::type_of($fid);
1396    
1397    Return the type of a feature, given a FIG feature ID (e.g. C<fig|100226.1.peg.3361>).
1398    
1399    =over 4
1400    
1401    =item fid
1402    
1403    ID of a feature whose type is desired.
1404    
1405    =item RETURN
1406    
1407    Returns the type of the feature (e.g. C<peg>, C<rna>, ...).
1408    
1409    =back
1410    
1411    =cut
1412    
1413    sub type_of {
1414        # Get the parameter.
1415        my ($fid) = @_;
1416        # Declare the return variable. We return undefined if the ID is unparseable.
1417        my $retVal;
1418        # Parse the FIG ID.
1419        if ($fid =~ /fig\|\d+\.\d+\.(\w+)\./) {
1420            # Save the type segment.
1421            $retVal = $1;
1422        }
1423        # Return the result.
1424        return $retVal;
1425    }
1426    
1427    
1428  =head3 verify_dir  =head3 verify_dir
1429    
1430      verify_dir($dirName);      verify_dir($dirName);

Legend:
Removed from v.1.35  
changed lines
  Added in v.1.36

MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3