Bio::C...:Table(3pm)

πŸ“¦
version 1.7.8 Β· 3 versions
, in debian bookworm, debian trixie, ubuntu jammy, ubuntu noble

✨ NAME ✨

Bio::CodonUsage::Table β€” for access to the Codon usage Database at http://www.kazusa.or.jp/codon.

okay so you're reading the Bio::CodonUsage::Table(3pm) page, which lives in User Contributed Perl Documentation, and bestie, it's lowkey iconic: it's your all-access pass to codon usage tables. Let's get into it πŸ’…


πŸ¦‹ SYNOPSIS πŸ¦‹

use Bio::CodonUsage::Table;
use Bio::DB::CUTG;
use Bio::CodonUsage::IO;
use Bio::Tools::SeqStats;

# Get  a codon usage table from web database
my $cdtable = Bio::DB::CUTG->new(-sp => 'Mus musculus',
                                 -gc => 1);

# Or from local file
my $io      = Bio::CodonUsage::IO->new(-file => "file");
my $cdtable = $io->next_data();

# Or create your own from a Bio::PrimarySeq compliant object,
# $codonstats is a ref to a hash of codon name /count key-value pairs
my $codonstats = Bio::Tools::SeqStats->count_codons($Seq_objct);

# '-data' must be specified, '-species' and 'genetic_code' are optional
my $CUT = Bio::CodonUsage::Table->new(-data    => $codonstats,
                                      -species => 'Hsapiens_kinase');

print "leu frequency is ", $cdtable->aa_frequency('LEU'), "\n";
print "freq of ATG is ", $cdtable->codon_rel_frequency('ttc'), "\n";
print "abs freq of ATG is ", $cdtable->codon_abs_frequency('ATG'), "\n";
print "number of ATG codons is ", $cdtable->codon_count('ATG'), "\n";
print "GC content at position 1 is ", $cdtable->get_coding_gc('1'), "\n";
print "total CDSs for Mus musculus  is ", $cdtable->cds_count(), "\n";

Like, three whole ways to get a table: pull it from the web database, read it from a local file, or build your own from a sequence object. Pick your fighter 🫢


🌸 DESCRIPTION 🌸

This class hands you the methods for poking around in codon usage table data. That's the whole vibe.

And rn, every single method is either a straight-up look-up of the table, or a lil derived calculation from the table. No cap, that's it.

Future methods could include measuring the codon usage of a sequence, for example, or provide methods for examining codon usage in alignments. So watch this space, bestie β€” the glow-up is coming ✨


πŸ’œ SEE ALSO πŸ’œ

  • Bio::Tools::CodonTable
  • Bio::WebAgent
  • Bio::CodonUsage::IO
  • Bio::DB::CUTG

πŸ’– FEEDBACK πŸ’–

πŸŽ€ Mailing Lists πŸŽ€

User feedback is an integral part of the evolution of this and other Bioperl modules. Send your comments and suggestions preferably to one of the Bioperl mailing lists. Your participation is much appreciated.

bioperl-l@bioperl.org                  - General discussion
http://bioperl.org/wiki/Mailing_lists  - About the mailing lists

🫢 Support 🫢

Please direct usage questions or support issues to the mailing list:

bioperl-l@bioperl.org

rather than to the module maintainer directly. Many experienced and reponsive experts will be able look at the problem and quickly address it. Please include a thorough description of the problem with code and data examples if at all possible.

fr fr, slide into the mailing list first β€” the maintainer does not need to be in your DMs with a bug report πŸ’€

πŸ› Reporting Bugs πŸ›

Report bugs to the Bioperl bug tracking system to help us keep track the bugs and their resolution. Bug reports can be submitted via the web:

https://github.com/bioperl/bioperl-live/issues

πŸ‘‘ AUTHORS πŸ‘‘

Richard Adams, Richard.Adams@ed.ac.uk


🧚 APPENDIX 🧚

The rest of the documentation details each of the object methods. Internal methods are usually preceded with a _


🌈 new 🌈

  • Title: new
  • Usage:
my $cut = Bio::CodonUsage::Table->new(-data => $cut_hash_ref,
                                      -species => 'H.sapiens_kinase'
                                      -genetic_code =>1);
  • Returns: a reference to a new Bio::CodonUsage::Table object
  • Args: none or a reference to a hash of codon counts. This constructor is designed to be compatible with the output of Bio::Tools::SeqUtils::count_codons(). Species and genetic code parameters can be entered here or via the species() and genetic_code() methods separately.

πŸ“ all_aa_frequencies πŸ“

  • Title: all_aa_frequencies
  • Usage:
my $freq = $cdtable->all_aa_frequencies();
  • Returns: a reference to a hash where each key is an amino acid and each value is its frequency in all proteins in that species.
  • Args: none

⭐ codon_abs_frequency ⭐

  • Title: codon_abs_frequency
  • Usage:
my $freq = $cdtable->codon_abs_frequency('CTG');
  • Purpose: To return the frequency of that codon as a percentage of all codons in the organism.
  • Returns: a percentage frequency
  • Args: a non-ambiguous codon string

πŸ’« codon_rel_frequency πŸ’«

  • Title: codon_rel_frequency
  • Usage:
my $freq = $cdtable->codon_rel_frequency('CTG');
  • Purpose: To return the frequency of that codon as a percentage of codons coding for the same amino acid. E.g., ATG and TGG would return 100 as those codons are unique.
  • Returns: a percentage frequency
  • Args: a non-ambiguous codon string

πŸ”₯ probable_codons πŸ”₯

  • Title: probable_codons
  • Usage:
my $prob_codons = $cd_table->probable_codons(10);
  • Purpose: to obtain a list of codons for the amino acid above a given threshold % relative frequency
  • Returns: A reference to a hash where keys are 1 letter amino acid codes and values are references to arrays of codons whose frequency is above the threshold.
  • Arguments: a minimum threshold frequency

🌟 most_common_codons 🌟

  • Title: most_common_codons
  • Usage:
my $common_codons = $cd_table->most_common_codons();
  • Purpose: To obtain the most common codon for a given amino acid
  • Returns: A reference to a hash where keys are 1 letter amino acid codes and the values are the single most common codons for those amino acids
  • Arguments: None

🧬 codon_count 🧬

  • Title: codon_count
  • Usage:
my $count = $cdtable->codon_count('CTG');
  • Purpose: To obtain the absolute number of the codons in the organism.
  • Returns: an integer
  • Args: a non-ambiguous codon string

🌈 get_coding_gc 🌈

  • Title: get_coding_gc
  • Usage:
my $count = $cdtable->get_coding_gc(1);
  • Purpose: To return the percentage GC composition for the organism at codon positions 1,2 or 3, or an average for all coding sequence ('all').
  • Returns: a number (%-age GC content) or 0 if these fields are undefined
  • Args: 1, 2, 3 or 'all'.

πŸŽ€ set_coding_gc πŸŽ€

  • Title: set_coding_gc
  • Usage:
my $count = $cdtable->set_coding_gc(-1=>55.78);
  • Purpose: To set the percentage GC composition for the organism at codon positions 1,2 or 3, or an average for all coding sequence ('all').
  • Returns: void
  • Args: a hash where the key must be 1, 2, 3 or 'all' and the value the %age GC at that codon position.

πŸ¦‹ species πŸ¦‹

  • Title: species
  • Usage:
my $sp = $cut->species();
  • Purpose: Get/setter for species name of codon table
  • Returns: Void or species name string
  • Args: None or species name string

πŸ’œ genetic_code πŸ’œ

  • Title: genetic_code
  • Usage:
my $sp = $cut->genetic_code();
  • Purpose: Get/setter for genetic_code name of codon table
  • Returns: Void or genetic_code id, 1 by default
  • Args: None or genetic_code id, 1 by default if invalid argument.

🌸 cds_count 🌸

  • Title: cds_count
  • Usage:
my $count = $cdtable->cds_count();
  • Purpose: To retrieve the total number of CDSs used to generate the Codon Table for that organism.
  • Returns: an integer
  • Args: none (if retrieving the value) or an integer( if setting ).

πŸ“ aa_frequency πŸ“

  • Title: aa_frequency
  • Usage:
my $freq = $cdtable->aa_frequency('Leu');
  • Purpose: To retrieve the frequency of an amino acid in the organism
  • Returns: a percentage
  • Args: a 1 letter or 3 letter string representing the amino acid

✨ common_codon ✨

  • Title: common_codon
  • Usage:
my $freq = $cdtable->common_codon('Leu');
  • Purpose: To retrieve the frequency of the most common codon of that aa
  • Returns: a percentage
  • Args: a 1 letter or 3 letter string representing the amino acid

πŸ’« rare_codon πŸ’«

  • Title: rare_codon
  • Usage:
my $freq = $cdtable->rare_codon('Leu');
  • Purpose: To retrieve the frequency of the least common codon of that aa
  • Returns: a percentage
  • Args: a 1 letter or 3 letter string representing the amino acid

and that's the whole page bestie πŸ’… this one's running on perl v5.32.1, dated 2021-08-15, and honestly? it ate. go count some codons, you've got this 🫢🧬✨
πŸ“¦ where this page comes from