Module: Bioroebe::MolecularWeightOfNucleotides
- Defined in:
- lib/bioroebe/nucleotides/molecular_weight_of_nucleotides.rb
Overview
Bioroebe::MolecularWeightOfNucleotides
Constant Summary collapse
- GUANINE =
#
MolecularWeightOfNucleotides::GUANINE
Molar weight of Guanine formula C5 H5 N5 O = 151.13 g/mol
#
151.13
- ADENINE =
#
ADENINE
Adenine: Molecular formula is C5H5N5.
To calculate on the commandline:
molmasse C5H5N5
#
135.13
- THYMINE =
#
THYMINE
Molecular formula: C5 H6 N2 O2
URL: en.wikipedia.org/wiki/Thymine
To calculate on the commandline:
molmasse C5H6N2O2
#
126.114
- CYTOSINE =
#
CYTOSINE
Molar mass of Cytosine, C4H5N3O = 111.102 g/mol (molar mass)
URL: en.wikipedia.org/wiki/Cytosine
#
111.102
Class Method Summary collapse
-
.e(i = '') ⇒ Object
# === Bioroebe::MolecularWeightOfNucleotides ========================================================================= #.
-
.hash ⇒ Object
# === MolecularWeightOfNucleotides.hash ========================================================================= #.
-
.report_weight ⇒ Object
# === MolecularWeightOfNucleotides.report_weight ========================================================================= #.
-
.weight_of_adenine? ⇒ Boolean
# === Bioroebe::MolecularWeightOfNucleotides.weight_of_adenine? ========================================================================= #.
-
.weight_of_cytosine? ⇒ Boolean
# === Bioroebe::MolecularWeightOfNucleotides.weight_of_cytosine? ========================================================================= #.
-
.weight_of_guanine? ⇒ Boolean
# === Bioroebe.MolecularWeightOfNucleotides.weight_of_guanine? ========================================================================= #.
-
.weight_of_thymine? ⇒ Boolean
# === Bioroebe::MolecularWeightOfNucleotides.weight_of_thymine? ========================================================================= #.
-
.weights ⇒ Object
# === Bioroebe::MolecularWeightOfNucleotides.weights # A T G C ========================================================================= #.
Class Method Details
.e(i = '') ⇒ Object
#
Bioroebe::MolecularWeightOfNucleotides
#
127 128 129 |
# File 'lib/bioroebe/nucleotides/molecular_weight_of_nucleotides.rb', line 127 def self.e(i = '') ::Bioroebe.e(i) end |
.hash ⇒ Object
#
MolecularWeightOfNucleotides.hash
#
100 101 102 103 104 105 106 107 |
# File 'lib/bioroebe/nucleotides/molecular_weight_of_nucleotides.rb', line 100 def self.hash return { 'Adenine' => ADENINE, 'Thymine' => THYMINE, 'Guanine' => GUANINE, 'Cytosine' => CYTOSINE, } end |
.report_weight ⇒ Object
#
MolecularWeightOfNucleotides.report_weight
#
112 113 114 115 116 117 118 119 120 121 122 |
# File 'lib/bioroebe/nucleotides/molecular_weight_of_nucleotides.rb', line 112 def self.report_weight e 'The molecular weight of the four main nucleotides are:'; e MolecularWeightOfNucleotides.hash.each_pair {|nucleotide, weight| weight = ('%.3f' % weight.to_f).to_s e ' '+ ::Bioroebe.steelblue( (nucleotide.to_s+':').ljust(10) )+ weight.to_s.rjust(8) }; e end |
.weight_of_adenine? ⇒ Boolean
#
Bioroebe::MolecularWeightOfNucleotides.weight_of_adenine?
#
49 50 51 |
# File 'lib/bioroebe/nucleotides/molecular_weight_of_nucleotides.rb', line 49 def self.weight_of_adenine? GUANINE end |
.weight_of_cytosine? ⇒ Boolean
#
Bioroebe::MolecularWeightOfNucleotides.weight_of_cytosine?
#
86 87 88 |
# File 'lib/bioroebe/nucleotides/molecular_weight_of_nucleotides.rb', line 86 def self.weight_of_cytosine? CYTOSINE end |
.weight_of_guanine? ⇒ Boolean
#
Bioroebe.MolecularWeightOfNucleotides.weight_of_guanine?
#
30 31 32 |
# File 'lib/bioroebe/nucleotides/molecular_weight_of_nucleotides.rb', line 30 def self.weight_of_guanine? GUANINE end |
.weight_of_thymine? ⇒ Boolean
#
Bioroebe::MolecularWeightOfNucleotides.weight_of_thymine?
#
70 71 72 |
# File 'lib/bioroebe/nucleotides/molecular_weight_of_nucleotides.rb', line 70 def self.weight_of_thymine? THYMINE end |