Module: BELParser::Language::AminoAcid

Defined in:
lib/bel_parser/language/amino_acid.rb

Overview

AminoAcid defines a controlled vocabulary of twenty Amino Acids that are encoded by the universal genetic code. It does not contain the additional Amino Acids incorporated into proteins by synthetic means.

see en.wikipedia.org/wiki/Amino_acid

Constant Summary collapse

Alanine =
[:Alanine, :A, :Ala].freeze
Arginine =
[:Arginine, :R, :Arg].freeze
Asparagine =
[:Asparagine, :N, :Asn].freeze
AsparticAcid =
[:'Aspartic Acid', :D, :Asp].freeze
Cysteine =
[:Cysteine, :C, :Cys].freeze
GlutamicAcid =
[:'Glutamic Acid', :E, :Glu].freeze
Glutamine =
[:Glutamine, :Q, :Gln].freeze
Glycine =
[:Glycine, :G, :Gly].freeze
Histidine =
[:Histidine, :H, :His].freeze
Isoleucine =
[:Isoleucine, :I, :Ile].freeze
Leucine =
[:Leucine, :L, :Leu].freeze
Lysine =
[:Lysine, :K, :Lys].freeze
Methionine =
[:Methionine, :M, :Met].freeze
Phenylalanine =
[:Phenylalanine, :F, :Phe].freeze
Proline =
[:Proline, :P, :Pro].freeze
Serine =
[:Serine, :S, :Ser].freeze
Threonine =
[:Threonine, :T, :Thr].freeze
Tryptophan =
[:Tryptophan, :W, :Trp].freeze
Tyrosine =
[:Tyrosine, :Y, :Tyr].freeze
Valine =
[:Valine, :V, :Val].freeze

Class Method Summary collapse

Class Method Details

.includes?(sym) ⇒ Boolean

Determines if sym represents an amino acid code.

supported amino acids; false if not supported

Parameters:

  • sym (#to_sym)

    amino acid code

Returns:

  • (Boolean)

    true if sym amino acid code is included in



35
36
37
# File 'lib/bel_parser/language/amino_acid.rb', line 35

def self.includes?(sym)
  @hash.key?(sym.to_sym)
end

.namesObject

Gets all supported amino acid names.



40
41
42
# File 'lib/bel_parser/language/amino_acid.rb', line 40

def self.names
  @names
end

.valuesObject

Gets all supported amino acid codes (i.e. name, 1-Letter, 3-Letter).



45
46
47
# File 'lib/bel_parser/language/amino_acid.rb', line 45

def self.values
  @values
end