File Coverage

blib/lib/Bio/Tools/CodonOptTable.pm
Criterion Covered Total %
statement 28 30 93.3
branch n/a
condition n/a
subroutine 10 10 100.0
pod n/a
total 38 40 95.0


line stmt bran cond sub pod time code
1             package Bio::Tools::CodonOptTable;
2              
3 1     1   28775 use warnings;
  1         3  
  1         39  
4 1     1   7 use strict;
  1         2  
  1         34  
5              
6 1     1   2880 use Data::Dumper;
  1         14903  
  1         80  
7 1     1   6019 use Bio::Root::Root;
  1         86553  
  1         32  
8 1     1   911 use Bio::PrimarySeq;
  1         35131  
  1         35  
9 1     1   990 use Bio::SeqIO;
  1         38052  
  1         40  
10 1     1   1116 use Bio::Tools::SeqStats;
  1         19040  
  1         42  
11 1     1   14 use Bio::Tools::CodonTable;
  1         3  
  1         25  
12 1     1   1214 use Bio::DB::GenBank;
  1         121409  
  1         36  
13 1     1   480 use GD::Graph::bars;
  0            
  0            
14             use Text::Textile qw(textile);
15             use File::Slurp;
16              
17             our $VERSION = '1.05';
18              
19             use vars qw(@ISA %AMINOACID %GENETIC_CODE);
20              
21             @ISA = ( 'Bio::Root::Root', 'Bio::SeqIO', 'Bio::PrimarySeq' );
22              
23             %GENETIC_CODE = (
24             'TCA' => 'S', # Serine
25             'TCC' => 'S', # Serine
26             'TCG' => 'S', # Serine
27             'TCT' => 'S', # Serine
28             'TTC' => 'F', # Phenylalanine
29             'TTT' => 'F', # Phenylalanine
30             'TTA' => 'L', # Leucine
31             'TTG' => 'L', # Leucine
32             'TAC' => 'Y', # Tyrosine
33             'TAT' => 'Y', # Tyrosine
34             'TAA' => '*', # Stop
35             'TAG' => '*', # Stop
36             'TGC' => 'C', # Cysteine
37             'TGT' => 'C', # Cysteine
38             'TGA' => '*', # Stop
39             'TGG' => 'W', # Tryptophan
40             'CTA' => 'L', # Leucine
41             'CTC' => 'L', # Leucine
42             'CTG' => 'L', # Leucine
43             'CTT' => 'L', # Leucine
44             'CCA' => 'P', # Proline
45             'CCC' => 'P', # Proline
46             'CCG' => 'P', # Proline
47             'CCT' => 'P', # Proline
48             'CAC' => 'H', # Histidine
49             'CAT' => 'H', # Histidine
50             'CAA' => 'Q', # Glutamine
51             'CAG' => 'Q', # Glutamine
52             'CGA' => 'R', # Arginine
53             'CGC' => 'R', # Arginine
54             'CGG' => 'R', # Arginine
55             'CGT' => 'R', # Arginine
56             'ATA' => 'I', # Isoleucine
57             'ATC' => 'I', # Isoleucine
58             'ATT' => 'I', # Isoleucine
59             'ATG' => 'M', # Methionine
60             'ACA' => 'T', # Threonine
61             'ACC' => 'T', # Threonine
62             'ACG' => 'T', # Threonine
63             'ACT' => 'T', # Threonine
64             'AAC' => 'N', # Asparagine
65             'AAT' => 'N', # Asparagine
66             'AAA' => 'K', # Lysine
67             'AAG' => 'K', # Lysine
68             'AGC' => 'S', # Serine
69             'AGT' => 'S', # Serine
70             'AGA' => 'R', # Arginine
71             'AGG' => 'R', # Arginine
72             'GTA' => 'V', # Valine
73             'GTC' => 'V', # Valine
74             'GTG' => 'V', # Valine
75             'GTT' => 'V', # Valine
76             'GCA' => 'A', # Alanine
77             'GCC' => 'A', # Alanine
78             'GCG' => 'A', # Alanine
79             'GCT' => 'A', # Alanine
80             'GAC' => 'D', # Aspartic Acid
81             'GAT' => 'D', # Aspartic Acid
82             'GAA' => 'E', # Glutamic Acid
83             'GAG' => 'E', # Glutamic Acid
84             'GGA' => 'G', # Glycine
85             'GGC' => 'G', # Glycine
86             'GGG' => 'G', # Glycine
87             'GGT' => 'G', # Glycine
88             );
89              
90             %AMINOACID = (
91             'A' => 'Ala', 'R' => 'Arg', 'N' => 'Asn', 'D' => 'Asp',
92             'C' => 'Cys', 'Q' => 'Gln', 'E' => 'Glu', 'G' => 'Gly',
93             'H' => 'His', 'I' => 'Ile', 'L' => 'Leu', 'K' => 'Lys',
94             'M' => 'Met', 'F' => 'Phe', 'P' => 'Pro', 'S' => 'Ser',
95             'T' => 'Thr', 'W' => 'Trp', 'Y' => 'Tyr', 'V' => 'Val',
96             'B' => 'Asx', 'Z' => 'glx', 'X' => 'Xaa', '*' => 'Stop'
97             );
98              
99             sub new {
100             my ( $class, @args ) = @_;
101             my $self = $class->SUPER::new(@args);
102             my (
103             $seq, $id, $acc, $pid,
104             $desc, $alphabet, $given_id, $is_circular,
105             $file, $format, $ncbi_id, $genetic_code
106             )
107             = $self->_rearrange(
108             [
109             qw(
110             SEQ
111             DISPLAY_ID
112             ACCESSION_NUMBER
113             PRIMARY_ID
114             DESC
115             ALPHABET
116             ID
117             IS_CIRCULAR
118             FILE
119             FORMAT
120             NCBI_ID
121             GENETIC_CODE
122             )
123             ],
124             @args
125             );
126              
127             if ( $file && $format ) {
128             ( $seq, $id, $alphabet ) = $self->_read_localfile( $file, $format );
129             }
130             if ($ncbi_id) {
131             ( $seq, $id, $desc, $alphabet ) = $self->_read_remotefile($ncbi_id);
132             }
133              
134             $self = Bio::PrimarySeq->new(
135             -seq => $seq,
136             -id => $id,
137             -accession_number => $acc,
138             -display_id => $given_id,
139             -desc => $desc,
140             -primary_id => $pid,
141             -alphabet => $alphabet,
142             -is_circular => $is_circular
143             );
144             $self->{'genetic_code'} = $genetic_code;
145             _build_codons($self);
146             _map_codon_iupac($self);
147             return bless $self, $class;
148             }
149              
150             sub _build_codons {
151             my $self = shift;
152              
153             my $seq_stats = Bio::Tools::SeqStats->new( -seq => $self );
154             my $codons = $seq_stats->count_codons();
155             my $total_codons;
156             foreach my $codon ( keys %GENETIC_CODE ) {
157             if ( !exists $codons->{$codon} ) {
158             $codons->{$codon} = 0;
159             }
160             }
161             $self->{'codons'} = $codons;
162             $self->{'monomers_count'} = $seq_stats->count_monomers();
163             $self->{'seq_mol_weight'} = $seq_stats->get_mol_wt();
164             delete $codons->{ambiguous} if($codons->{ambiguous});
165            
166             return 1;
167             }
168              
169             sub _read_remotefile {
170             my ( $self, $ncbi_id ) = @_;
171              
172             my ( $seq, $id, $desc, $alphabet );
173              
174             my $retrivefile = new Bio::DB::GenBank(
175             -retrievaltype => 'tempfile',
176             -format => 'Fasta'
177             );
178              
179             my $fetchedfile = $retrivefile->get_Stream_by_acc($ncbi_id);
180             my $seq_data = $fetchedfile->next_seq;
181              
182             $seq = $seq_data->seq;
183             $id = $seq_data->primary_id;
184             $desc = $seq_data->desc;
185             $alphabet = $seq_data->alphabet;
186              
187             return ( $seq, $id, $desc, $alphabet );
188             }
189              
190             sub _read_localfile {
191             my ( $self, $file, $format ) = @_;
192              
193             my ( $seq, $id, $alphabet );
194              
195             my $inputstream = Bio::SeqIO->new(
196             -file => $file,
197             -format => $format
198             );
199             my $input = $inputstream->next_seq();
200              
201             $seq = $input->seq();
202             $id = $input->id;
203             $alphabet = $input->alphabet;
204              
205             return ( $seq, $id, $alphabet );
206             }
207              
208             sub rscu_rac_table {
209             my $self = shift;
210              
211             my $codons = $self->{'codons'};
212             my ( @codons, $max_rscu ) = $self->_calculate_rscu();
213             my $rscu_rac = $self->_calculate_rac( @codons, $max_rscu );
214             my @sorted_codons_by_aa =
215             sort { $a->{aa_name} cmp $b->{aa_name} } @$rscu_rac;
216              
217             return \@sorted_codons_by_aa;
218             }
219              
220             sub _map_codon_iupac {
221             my $self = shift;
222              
223             my $myCodonTable = Bio::Tools::CodonTable->new();
224             my $codons = $self->{'codons'};
225             $self->{'genetic_code'} = 1 if ( !$self->{'genetic_code'} );
226              
227             $myCodonTable->id( $self->{'genetic_code'} );
228              
229             my $myCodons;
230              
231             foreach my $single_codon ( keys %$codons ) {
232             my $aa_name_abri = $myCodonTable->translate($single_codon);
233             my $aa_name = $AMINOACID{$aa_name_abri};
234             $myCodons->{$single_codon} = {
235             'frequency' => $codons->{$single_codon},
236             'aa_name' => $aa_name,
237             };
238             }
239             $self->{'codons'} = $myCodons;
240              
241             return 1;
242             }
243              
244             # Function : Calculate the RSCU(Relative Synonymous Codons Uses).
245             # Note : The formula is used in the following references.
246             # http://www.pubmedcentral.nih.gov/articlerender.fcgi?tool=pubmed&pubmedid=3547335
247              
248             sub _calculate_rscu {
249             my $self = shift;
250              
251             my $codons = $self->{'codons'};
252              
253             my ( $rscu, @myCodons, %rscu_max_table );
254              
255             foreach my $each_codon ( keys %$codons ) {
256             my $amino = $codons->{$each_codon}->{'aa_name'};
257             my $freq = $codons->{$each_codon}->{'frequency'};
258             my $count;
259             my $all_freq_aa = 0;
260             if ($amino) {
261             foreach my $goforall ( keys %$codons ) {
262             if ( $amino && ( $codons->{$goforall}->{'aa_name'} eq $amino ) )
263             {
264             $all_freq_aa += $codons->{$goforall}->{'frequency'};
265             $count++;
266             }
267             }
268             $rscu = $all_freq_aa > 0 ? $count * $freq / $all_freq_aa : 0.00;
269             }
270             if ( !defined( $rscu_max_table{$amino} )
271             || ( $rscu_max_table{$amino} < $rscu ) )
272             {
273             $rscu_max_table{$amino} = $rscu;
274             }
275             push @myCodons,
276             {
277             codon => $each_codon,
278             frequency => $freq,
279             aa_name => $amino,
280             rscu => $rscu,
281             total_aa_comb => $count,
282             all_fre_aa => $all_freq_aa,
283             };
284             }
285             return ( \@myCodons, \%rscu_max_table );
286             }
287              
288             # Function : Calculate the RAC (Relative Adaptiveness of a Codon).
289             # Note : The formula is used in the following references.
290             # http://www.pubmedcentral.nih.gov/articlerender.fcgi?tool=pubmed&pubmedid=3547335
291              
292             sub _calculate_rac {
293             my ( $self, $codons, $max_rscu ) = @_;
294             my ( $rac, @myCodons );
295              
296             foreach my $each_codon (@$codons) {
297             my $amino = $each_codon->{'aa_name'};
298             my $rscu = $each_codon->{'rscu'};
299             if ($amino) {
300             my $max = $max_rscu->{$amino};
301             $rac = $max > 0 ? $rscu / $max : 0.00;
302             push @myCodons,
303             {
304             'codon' => $each_codon->{'codon'},
305             'frequency' => $each_codon->{'frequency'},
306             'aa_name' => $amino,
307             'rscu' => sprintf( "%.2f", $rscu ),
308             'rac' => sprintf( "%.2f", $rac ),
309             };
310             }
311             }
312             return ( \@myCodons );
313             }
314              
315             # The CAI index is defined as the geometric mean of these relative adaptiveness values.
316             sub calculate_cai {
317             my ( $self, $rscu_rac ) = @_;
318              
319             my $count;
320             my $w;
321             foreach my $codon (@$rscu_rac) {
322             $w += $codon->{rac};
323             $count++;
324             }
325             my $cai = $w * ( 1 / $count );
326              
327             # A CAI of 1.0 is considered to be perfect in the desired expression organism, and a
328             # CAI of >0.9 is regarded as very good, in terms of high gene expression level.
329             return sprintf( "%.2f", $cai );
330             }
331              
332             sub prefered_codon {
333             my ( $self, $codons ) = @_;
334             my $prefered_codon;
335             for my $each_aa (@$codons) {
336             my $aa_name = $each_aa->{'aa_name'};
337             my $rscu = $each_aa->{'rscu'};
338             my $codon = $each_aa->{'codon'};
339             my $frequency = $each_aa->{'frequency'};
340              
341             if ( !defined( $prefered_codon->{$aa_name} )
342             || ( $prefered_codon->{$aa_name} < $rscu ) )
343             {
344             $prefered_codon->{$aa_name} = $codon;
345             }
346             }
347             return $prefered_codon;
348             }
349              
350             sub generate_graph {
351             my ( $self, $codons, $output_file ) = @_;
352              
353             my ( @x_axis_labels, @rscu, @rac, @x_axis_values, @codons_table,
354             @codon_freq );
355             my $y_axis_max = 8;
356             my @category_colours = qw(red dgreen);
357             my $bar_graph = new GD::Graph::bars( 1000, 500 );
358              
359             foreach my $each_aa (@$codons) {
360             if ( $each_aa->{'aa_name'} ) {
361             push( @codons_table,
362             $each_aa->{'aa_name'} . "(" . $each_aa->{'codon'} . ")" );
363             push( @codon_freq, $each_aa->{'frequency'} );
364             push( @x_axis_labels,
365             $each_aa->{'codon'} . "("
366             . $each_aa->{'frequency'} . ")" . "-"
367             . $each_aa->{'aa_name'} );
368             push( @rscu, $each_aa->{'rscu'} );
369             push( @rac, $each_aa->{'rac'} );
370             }
371             }
372              
373             my @bar_graph_table;
374             push( @bar_graph_table, \@x_axis_labels );
375             push( @bar_graph_table, \@rscu );
376             push( @bar_graph_table, \@rac );
377              
378             $bar_graph->set(
379             title =>
380             'Graph Representing : Relative Synonymous Codons Uses and Relative Adaptiveness of a Codon for '
381             . $self->display_id,
382             y_label => 'RSCU and RAC values', #y-axis label
383             y_max_value => $y_axis_max, #the max value of the y-axis
384             y_min_value => 0
385             , #the min value of y-axis, note set below 0 if negative values are required
386             y_tick_number => 20, #y-axis scale increment
387             y_label_skip => 1, #label every other y-axis marker
388             box_axis => 0, #do not draw border around graph
389             line_width => 2, #width of lines
390             legend_spacing => 5, #spacing between legend elements
391             legend_placement => 'RC', #put legend to the centre right of chart
392             dclrs => \@category_colours
393             , #reference to array of category colours for each line
394             bgclr => 'red',
395             long_ticks => 0,
396             tick_length => 3,
397             x_labels_vertical => 1,
398             ) || die "\nFailed to create line graph: $bar_graph->error()";
399              
400             $bar_graph->set_legend( 'RSCU Value', 'RAC Value' );
401              
402             my $plot = $bar_graph->plot( \@bar_graph_table );
403              
404             my $line_file = $output_file;
405             open( GPH, ">$line_file" )
406             || die("\nFailed to save graph to file: $line_file. $!");
407             binmode(GPH);
408             print GPH $plot->gif();
409             close(GPH);
410             }
411              
412             sub generate_report {
413             my ( $self, $out_file ) = @_;
414              
415             my $myCodons = $self->rscu_rac_table();
416             my $sequence_id = $self->id;
417             my $genetic_code = $self->{genetic_code};
418             my $monomers = $self->{monomers_count};
419             my $cai = $self->calculate_cai($myCodons);
420              
421             my %colors = (
422             'Ala' => '#f4f4f4', 'Arg' => '#FF99FF', 'Asn' => '#CC99CC',
423             'Asp' => '#99FFCC', 'Cys' => '#99CC99', 'Gln' => '#CCFF00',
424             'Glu' => '#FF00CC', 'Gly' => '#33FFCC', 'His' => '#66CCFF',
425             'Ile' => '#c9c9c9', 'Leu' => '#CCFFFF', 'Lys' => '#FFFFCC',
426             'Met' => '#FFFF66', 'Phe' => '#FFCC00', 'Pro' => '#F4F4F4',
427             'Ser' => '#FF99FF', 'Thr' => '#CC99CC', 'Trp' => '#99FFCC',
428             'Tyr' => '#CCFF00', 'Val' => '#33FFCC', 'Asx' => '#6666CC',
429             'glx' => '#FF00CC', 'Xaa' => '#cccccc', 'Stop' => '#f8f8f8'
430             );
431              
432             my $codons = "|%{color:red}CODON%|";
433             my $aa_name = "|%{color:red}AMINOACID%|";
434             my $counts = "|%{color:red}COUNT%|";
435             my $rscu = "|%{color:red}RSCU%|";
436             my $rac = "|%{color:red}RAC%|";
437              
438             foreach my $each_codon (@$myCodons) {
439             my $frequency = $each_codon->{frequency} || 'O';
440             my $amino_acid = $each_codon->{aa_name};
441             my $codon = $each_codon->{codon};
442             my $rscu_value = $each_codon->{rscu};
443             my $rac_value = $each_codon->{rac};
444             my $aa_color = $colors{$amino_acid};
445              
446             $codons .= "%{background:$aa_color}$codon%|";
447             $aa_name .= "%{background:$aa_color}$amino_acid%|";
448             $counts .= "%{background:$aa_color}$frequency%|";
449             $rscu .= "%{background:$aa_color}$rscu_value%|";
450             $rac .= "%{background:$aa_color}$rac_value%|";
451             }
452             my $codon_uses = "$codons\n$aa_name\n$counts\n";
453             my $rscu_uses = "$codons\n$aa_name\n$rscu\n";
454             my $rac_uses = "$codons\n$aa_name\n$rac\n";
455             my $mono_mers =
456             "|%{color:red}A%|"
457             . $monomers->{A} . "|\n"
458             . "|%{color:red}T%|"
459             . $monomers->{T} . "|\n"
460             . "|%{color:red}G%|"
461             . $monomers->{G} . "|\n"
462             . "|%{color:red}C%|"
463             . $monomers->{C} . "|\n";
464              
465             my $gc_percentage =
466             ( ( $monomers->{G} + $monomers->{C} ) /
467             ( $monomers->{A} + $monomers->{T} + $monomers->{G} + $monomers->{C} )
468             ) * 100;
469             $gc_percentage = sprintf( "%.2f", $gc_percentage );
470              
471             my $REPORT = <<EOT;
472             h1. Bio::Tools::CodonOptTable
473              
474             %{color:green}Report for $sequence_id%
475              
476             %{color:red}Codon Adaptation Index (CAI) for sequence% : $cai
477              
478             %{color:red}GC percentage for sequence% : $gc_percentage%
479              
480             %{color:red}GENETIC CODE USED% : $genetic_code "--more about genetic code--":http://www.ncbi.nlm.nih.gov/Taxonomy/Utils/wprintgc.cgi
481              
482             %{background:#336699;color:white;padding:5px}++**CODON USAGE**++%
483              
484             $codon_uses
485              
486             %{background:#336699;color:white;padding:5px}++**Relative Synonimous Codon Usage (RSCU)**++%
487              
488             $rscu_uses
489              
490             %{background:#336699;color:white;padding:5px}++**Relative Adaptiveness of Codon**++%
491              
492             $rac_uses
493              
494             %{background:#336699;color:white;padding:5px}++**Monomers**++%
495              
496             $mono_mers
497              
498             "Source code":http://search.cpan.org/~shardiwal/Bio-Tools-CodonOptTable-$VERSION/lib/Bio/Tools/CodonOptTable.pm is available.
499              
500             EOT
501              
502             my $html = textile($REPORT);
503             write_file( $out_file, $html );
504             }
505              
506             1; # End of Bio::Tools::CodonOptTable
507              
508             __END__
509              
510             =head1 NAME
511              
512             Bio::Tools::CodonOptTable - A more elaborative way to check the codons usage!
513              
514             =head1 VERSION
515              
516             Version 1.05
517              
518             =head1 SYNOPSIS
519              
520             use Bio::Tools::CodonOptTable;
521              
522             my $seqobj = Bio::Tools::CodonOptTable->new(
523             -seq => 'ATGGGGTGGGCACCATGCTGCTGTCGTGAATTTGGGCACGATGGTGTACGTGCTCGTAGCTAGGGTGGGTGGTTTG',
524             -id => 'GeneFragment-12',
525             -accession_number => 'Myseq1',
526             -alphabet => 'dna',
527             -is_circular => 1,
528             -genetic_code => 1,
529             );
530            
531             #If you wanna read from file
532             my $seqobj = Bio::Tools::CodonOptTable->new(
533             -file => "contig.fasta",
534             -format => 'Fasta',
535             -genetic_code => 1,
536             );
537            
538             #If you have Accession number and want to get file from NCBI
539             my $seqobj = Bio::Tools::CodonOptTable->new(
540             -ncbi_id => "J00522",
541             -genetic_code => 1,
542             );
543            
544             my $myCodons = $seqobj->rscu_rac_table();
545            
546             if ($myCodons) {
547             foreach my $each_aa (@$myCodons) {
548             print "Codon : ", $each_aa->{'codon'}, "\t";
549             print "Frequency : ", $each_aa->{'frequency'}, "\t";
550             print "AminoAcid : ", $each_aa->{'aa_name'}, "\t";
551             print "RSCU Value : ", $each_aa->{'rscu'}, "\t"; #Relative Synonymous Codons Uses
552             print "RAC Value : ", $each_aa->{'rac'}, "\t \n"; #Relative Adaptiveness of a Codon
553             }
554             }
555            
556             # To get the prefered codon list based on RSCU & RAC Values
557             my $prefered_codons = $seqobj->prefered_codon($myCodons);
558             while ( my ( $amino_acid, $codon ) = each(%$prefered_codons) ) {
559             print "AminoAcid : $amino_acid \t Codon : $codon\n";
560             }
561            
562             # To produce a graph between RSCU & RAC
563             # Graph output file extension should be GIF, we support GIF only
564             $seqobj->generate_graph( $myCodons, $outfile_name );
565            
566             # To Calculate Codon Adaptation Index (CAI)
567             my $gene_cai = $seqobj->calculate_cai($myCodons);
568              
569             # To Produce HTML report
570             # This function will generate HTML report, outfile extension should be .html
571             $seqobj->generate_report($outfile_name);
572              
573             =head1 DESCRIPTION
574              
575             The purpose of this module is to show codon usage.
576              
577             We produces each codon frequency,
578             Relative Synonymous Codons Uses and
579             Relative Adaptiveness of a Codon table and bar graph
580             that will help you to calculate the Codon Adaptation Index (CAI) of a gene, to see the gene expression level.
581              
582             Relative Synonymous Codons Uses(RSCU) values are the number of times a particular codon is observed, relative to the number of times
583             that the codon would be observed in the absence of any codon usage bias.
584              
585             In the absence of any codon usage bias, the RSCU value would be 1.00.
586             A codon that is used less frequently than expected will have a value of less than 1.00 and vice versa for a codon that is used more frequently than expected.
587              
588             Genetics Code: NCBI takes great care to ensure that the translation for each coding sequence (CDS) present in GenBank records is correct. Central to this effort is careful checking on the taxonomy of each record and assignment of the correct genetic code (shown as a /transl_table qualifier on the CDS in the flat files) for each organism and record. This page summarizes and references this work.
589             http://www.ncbi.nlm.nih.gov/Taxonomy/Utils/wprintgc.cgi
590              
591             The following functions are provided by this module:
592              
593             =over 3
594              
595             =item new()
596              
597             Constructor.
598              
599             =item rscu_rac_table()
600              
601             To Produce RSCU and RAC table along with codon and Amino acid name.
602              
603             =item prefered_codon($myCodons)
604              
605             Return you prefered codons list.
606              
607             =item generate_graph($myCodons,"outputfile.gif")
608              
609             Produce a bar graph between RAC(Relative Adaptiveness of a Codon) & RSCU (Relative Synonymous Codons Uses).
610              
611             =item calculate_cai($myCodons)
612              
613             Calculate Codon Adaptation Index (CAI) for sequence.
614              
615             =item generate_report($outfile_name);
616              
617             To Produce HTML report, this function will generate HTML report, outfile extension should be .html
618             example output : L<http://search.cpan.org/src/SHARDIWAL/Bio-Tools-CodonOptTable-1.05/result.html>
619              
620             =back
621              
622             =head1 AUTHOR
623              
624             Rakesh Kumar Shardiwal, C<< <rakesh.shardiwal at gmail.com> >>
625              
626             =head1 BUGS
627              
628             Please report any bugs or feature requests to C<bug-bio-tools-codonopttable at rt.cpan.org>, or through
629             the web interface at L<http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Bio-Tools-CodonOptTable>. I will be notified, and then you'll
630             automatically be notified of progress on your bug as I make changes.
631              
632             =head1 SUPPORT
633              
634             You can find documentation for this module with the perldoc command.
635              
636             perldoc Bio::Tools::CodonOptTable
637              
638              
639             You can also look for information at:
640              
641             =over 4
642              
643             =item * RT: CPAN's request tracker
644              
645             L<http://rt.cpan.org/NoAuth/Bugs.html?Dist=Bio-Tools-CodonOptTable>
646              
647             =item * AnnoCPAN: Annotated CPAN documentation
648              
649             L<http://annocpan.org/dist/Bio-Tools-CodonOptTable>
650              
651             =item * CPAN Ratings
652              
653             L<http://cpanratings.perl.org/d/Bio-Tools-CodonOptTable>
654              
655             =item * Search CPAN
656              
657             L<http://search.cpan.org/dist/Bio-Tools-CodonOptTable>
658              
659             =back
660              
661             =head1 COPYRIGHT & LICENSE
662              
663             Copyright 2010 Rakesh Kumar Shardiwal, all rights reserved.
664              
665             This program is free software; you can redistribute it and/or modify it
666             under the same terms as Perl itself.
667              
668             =cut