Module: Bioroebe::CodonTable
- Defined in:
- lib/bioroebe/codons/codon_table.rb
Class Method Summary collapse
-
.[](i) ⇒ Object
# === Bioroebe::CodonTable[].
-
.by_name(i = 'Vertebrate Mitochondrial') ⇒ Object
# === Bioroebe::CodonTable.by_name.
Class Method Details
.[](i) ⇒ Object
#
Bioroebe::CodonTable[]
This method will return a Hash containing the codon table for the given organism/species at hand. It will NOT modify the main codon table in use.
For a list of these codons, see this page:
https://www.ncbi.nlm.nih.gov/Taxonomy/Utils/wprintgc.cgi?mode=t#SG1
To obtain the human codon table, do either of the following:
human_codon_table = Bioroebe::CodonTable[:human]
human_codon_table = Bioroebe::CodonTable[1]
Usage example:
Bioroebe::CodonTable[2]
#
385 386 387 |
# File 'lib/bioroebe/codons/codon_table.rb', line 385 def self.[](i) ::Bioroebe.load_the_codon_table_dataset(i) end |
.by_name(i = 'Vertebrate Mitochondrial') ⇒ Object
#
Bioroebe::CodonTable.by_name
This method can be used to return the proper codon-table dataset. It will additionally change the main codon table in use for the Bioroebe “namespace”. If you wish to avoid this, consider using Bioroebe::CodonTable[] instead.
Usage example:
x = Bioroebe::CodonTable.by_name("Vertebrate Mitochondrial")
#
402 403 404 405 |
# File 'lib/bioroebe/codons/codon_table.rb', line 402 def self.by_name(i = 'Vertebrate Mitochondrial') ::Bioroebe.set_use_this_codon_table(i) return ::Bioroebe.codon_table_dataset? end |