[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.16, Tue Nov 24 19:50:47 2009 UTC revision 1.17, Wed Dec 2 00:37:14 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);                       standard_genetic_code parse_location roles_in_function);
30    
31  =head1 SEED Utility Methods  =head1 SEED Utility Methods
32    
# Line 107  Line 107 
107      return ($contig, $min, $max);      return ($contig, $min, $max);
108  }  }
109    
110    
111    =head3 roles_in_function
112    
113        my @roles = roles_in_function($assignment);
114    
115    Return a list of the functional roles in the specified assignment string.
116    A single assignment may contain multiple roles as well as comments; this
117    method separates them out.
118    
119    =over 4
120    
121    =item assignment
122    
123    Functional assignment to parse for roles.
124    
125    =item RETURN
126    
127    Returns a list of the individual roles in the assignment.
128    
129    =back
130    
131    =cut
132    
133    sub roles_in_function {
134        # Get the parameters.
135        my ($assignment) = @_;
136        # Remove any comment.
137        my $commentFree = ($assignment =~ /(.+)\s*#/ ? $1 : $assignment);
138        # Split out the roles.
139        my @retVal = split /\s*[\/@;]\s*/, $commentFree;
140        # Return the result.
141        return @retVal;
142    }
143    
144    
145  =head3 parse_location  =head3 parse_location
146    
147      my ($contig, $begin, $end) = parse_location($locString);      my ($contig, $begin, $end) = parse_location($locString);

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

MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3