[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.17, Wed Dec 2 00:37:14 2009 UTC revision 1.18, Thu Dec 3 15:34:16 2009 UTC
# Line 26  Line 26 
26      use base qw(Exporter);      use base qw(Exporter);
27      our @EXPORT = qw(hypo boundaries_of parse_fasta_record create_fasta_record      our @EXPORT = qw(hypo boundaries_of parse_fasta_record create_fasta_record
28                       rev_comp genome_of min max sims verify_dir between translate                       rev_comp genome_of min max sims verify_dir between translate
29                       standard_genetic_code parse_location roles_in_function);                       standard_genetic_code parse_location roles_in_function
30                         strip_ec);
31    
32  =head1 SEED Utility Methods  =head1 SEED Utility Methods
33    
# Line 134  Line 135 
135      # Get the parameters.      # Get the parameters.
136      my ($assignment) = @_;      my ($assignment) = @_;
137      # Remove any comment.      # Remove any comment.
138      my $commentFree = ($assignment =~ /(.+)\s*#/ ? $1 : $assignment);      my $commentFree = ($assignment =~ /(.+?)\s*#/ ? $1 : $assignment);
139      # Split out the roles.      # Split out the roles.
140      my @retVal = split /\s*[\/@;]\s*/, $commentFree;      my @retVal = split /\s+[\/@;]\s+/, $commentFree;
141      # Return the result.      # Return the result.
142      return @retVal;      return @retVal;
143  }  }
# Line 966  Line 967 
967      return $prot;      return $prot;
968  }  }
969    
970    =head3 strip_ec
971    
972        my $role = strip_ec($rawRole);
973    
974    Strip the EC number (if any) from the specified role or functional
975    assignment.
976    
977    =over 4
978    
979    =item rawRole
980    
981    Role or functional assignment from which the EC numbers are to be stripped.
982    
983    =item RETURN
984    
985    Returns the incoming string with any EC numbers removed. The EC numbers must
986    be formatted in the standard format used by the SEED (with the C<EC> prefix
987    and surrounding parentheses).
988    
989    =back
990    
991    =cut
992    
993    sub strip_ec {
994        # Get the parameters.
995        my ($rawRole) = @_;
996        # Declare the return variable.
997        my $retVal = $rawRole;
998        # Remove the EC numbers.
999        $retVal =~ s/\s*\(EC\s+[0-9.\-]+\)//g;
1000        # Return the result.
1001        return $retVal;
1002    }
1003    
1004    
1005  1;  1;

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

MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3