[Bioperl-l] What file format does Bio::CodonUsage::IO expect?

Ben McIlwain cydeweys at gmail.com
Sun Apr 29 09:43:55 EDT 2007


I'm trying to load up a table of codon usage frequencies I've downloaded
from the web using Bio::CodonUsage::IO.  My code looks like this:

    use Bio::CodonUsage::Table;
    use Bio::CodonUsage::IO;
    # ...
    my $io = Bio::CodonUsage::IO->new(-file=>$freqFile);
    my $codonTable = $io->next_data();

Unfortunately, I can't seem to find any documentation on what format the
codon usage table file is expected to be in, and all of my best guesses
seem to be invalid, yielding the following error message:

-------------------- WARNING ---------------------
MSG: probable parsing error - should be 21 entries for 20aa + stop codon
---------------------------------------------------

I've tried using both formats that are available from the Codon Usage
Database (easily the largest source of codon usage frequencies),
available here: http://www.kazusa.or.jp/codon/

The two formats I've tried and failed look like this:

UUU 32.5( 45732)  UCU 15.3( 21588)  UAU 27.8( 39146)  UGU  6.3(  8796)
UUC 14.3( 20101)  UCC  3.2(  4458)  UAC  9.3( 13016)  UGC  2.1(  2971)
...


AND

AmAcid  Codon      Number    /1000     Fraction   ..

Gly     GGG     13198.00      9.38      0.14
Gly     GGA     34123.00     24.26      0.36
...


So, anyone know how to get this downloaded codon usage data loaded up
into a Bio::CodonUsage::Table object?  Bio::CodonUsage::IO doesn't seem
to like parsing the standard formats.  Thanks.


More information about the Bioperl-l mailing list