in reply to How can I get the values of codon usage using the Bio::CUA module?
Hello supriyoch_2008,
The changes proposed by u65 are a good start, but in addition I’ve had to (1) change:
use Bio::CUA; # perl module
to:
use Bio::CUA::CUB::Calculator; use Bio::CUA::SeqIO;
(2) create an empty file tai.out; (3) put the coding sequence in a file cds.dat and change:
my $io = Bio::CUA::SeqIO->new($cds);
to:
my $io = Bio::CUA::SeqIO->new(-file => 'cds.dat');
(4) change three occurrences of printf to sprintf:
my $tai_val = sprintf "%10s: %.7f\n", $seq->id, $tai; my $CAI_val = sprintf "%10s: %.7f\n", $seq->id, $CAI; my $encp_val = sprintf "%10s: %.7f\n", $seq->id, $encp;
But I’m still not getting meaningful output. :-( You need to specify for the PerlMonks exactly what output you expect to get. Also, you will need to address the following warnings:
------------- WARNING Bio::CUA::CUB::Calculator ------------- MSG: CAI values for codons were not provided for this analyzer, so can + not calculate CAI for sequences ------------------------------------------------------------- ... ------------- WARNING Bio::CUA::CUB::Calculator ------------- MSG: No default base composition for seq '', so no GC-corrected ENC -------------------------------------------------------------
But I note that the documentation for Bio::CUA::SeqIO says that it is:
a package to parse sequence file if module Bio::SeqIO is unavailable in the system.
So perhaps you would be better off experimenting with the Bio::SeqIO module?
Hope that helps,
| Athanasius <°(((>< contra mundum | Iustus alius egestas vitae, eros Piratica, |
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: How can I get the values of codon usage using the Bio::CUA module?
by supriyoch_2008 (Monk) on Nov 12, 2015 at 15:04 UTC |