Bio::KEGG::COMPOUND is a parser class for the KEGG COMPOUND database entry. KEGG COMPOUND is a chemical structure database.
Creates a new Bio::KEGG::COMPOUND object.
Arguments:
(required) entry: (String) single entry as a string
Returns |
Bio::KEGG::COMPOUND object |
# File lib/bio/db/kegg/compound.rb, line 45 def initialize(entry) super(entry, TAGSIZE) end
Returns a Hash of the DB name and an Array of entry IDs in DBLINKS field.
# File lib/bio/db/kegg/compound.rb, line 32 def dblinks_as_hash; super; end
DBLINKS
# File lib/bio/db/kegg/compound.rb, line 122 def dblinks_as_strings lines_fetch('DBLINKS') end
ENTRY
# File lib/bio/db/kegg/compound.rb, line 50 def entry_id field_fetch('ENTRY')[/\S+/] end
# File lib/bio/db/kegg/compound.rb, line 109 def enzymes unless @data['ENZYME'] field = fetch('ENZYME') if /\(/.match(field) # old version @data['ENZYME'] = field.scan(/\S+ \(\S+\)/) else @data['ENZYME'] = field.scan(/\S+/) end end @data['ENZYME'] end
FORMULA
# File lib/bio/db/kegg/compound.rb, line 65 def formula field_fetch('FORMULA') end
# File lib/bio/db/kegg/compound.rb, line 80 def glycans unless @data['GLYCAN'] @data['GLYCAN'] = fetch('GLYCAN').split(/\s+/) end @data['GLYCAN'] end
ATOM, BOND
# File lib/bio/db/kegg/compound.rb, line 127 def kcf return "#{get('ATOM')}#{get('BOND')}" end
MASS
# File lib/bio/db/kegg/compound.rb, line 70 def mass field_fetch('MASS').to_f end
The first name recorded in the NAME field.
# File lib/bio/db/kegg/compound.rb, line 60 def name names.first end
NAME
# File lib/bio/db/kegg/compound.rb, line 55 def names field_fetch('NAME').split(/\s*;\s*/) end
Returns a Hash of the pathway ID and name in PATHWAY field.
# File lib/bio/db/kegg/compound.rb, line 37 def pathways_as_hash; super; end
# File lib/bio/db/kegg/compound.rb, line 104 def pathways_as_strings lines_fetch('PATHWAY') end
# File lib/bio/db/kegg/compound.rb, line 88 def reactions unless @data['REACTION'] @data['REACTION'] = fetch('REACTION').split(/\s+/) end @data['REACTION'] end
Generated with the Darkfish Rdoc Generator 2.
COMMENT