Module: Mspire::Mass::All
- Defined in:
- lib/mspire/mass/all.rb
Overview
provides hashes with both Amino Acids (uppercase letters) and elements (lowercased) along with common abbreviations
Constant Summary collapse
- MONO_STRING =
downcase_keys( Element::MONO_STRING ) .merge( downcase_keys( Common::MONO_STRING ) ) .merge( AA::MONO_STRING ) .merge( downcase_keys( Subatomic::MONO_STRING ) )
- MONO_SYMBOL =
Mspire::Mass::Util.symbol_keys( MONO_STRING )
- MONO =
MONO_STRING.merge( MONO_SYMBOL )
- AVG_STRING =
downcase_keys( Element::AVG_STRING ) .merge( downcase_keys( Common::AVG_STRING ) ) .merge( AA::AVG_STRING ) .merge( downcase_keys( Subatomic::MONO_STRING ) )
- AVG_SYMBOL =
^^ NOTE: we use MONO values for Subatomic since avg makes no sense
Mspire::Mass::Util.symbol_keys( AVG_STRING )
- AVG =
AVG_STRING.merge( AVG_SYMBOL )
Class Method Summary collapse
Class Method Details
.[](key) ⇒ Object
30 31 32 |
# File 'lib/mspire/mass/all.rb', line 30 def [](key) MONO[key] end |
.downcase_keys(hash) ⇒ Object
8 9 10 |
# File 'lib/mspire/mass/all.rb', line 8 def self.downcase_keys(hash) Hash[ hash.map {|key,val| [key.to_s.downcase, val] } ] end |