Class | Bio::KEGG::COMPOUND |
In: |
lib/bio/db/kegg/compound.rb
|
Parent: | KEGGDB |
Bio::KEGG::COMPOUND is a parser class for the KEGG COMPOUND database entry. KEGG COMPOUND is a chemical structure database.
DELIMITER | = | RS = "\n///\n" |
TAGSIZE | = | 12 |
Creates a new Bio::KEGG::COMPOUND object.
Arguments:
Returns: | Bio::KEGG::COMPOUND object |
# File lib/bio/db/kegg/compound.rb, line 45 45: def initialize(entry) 46: super(entry, TAGSIZE) 47: end
COMMENT
# File lib/bio/db/kegg/compound.rb, line 132 132: def comment 133: field_fetch('COMMENT') 134: end
DBLINKS
# File lib/bio/db/kegg/compound.rb, line 122 122: def dblinks_as_strings 123: lines_fetch('DBLINKS') 124: end
ENTRY
# File lib/bio/db/kegg/compound.rb, line 50 50: def entry_id 51: field_fetch('ENTRY')[/\S+/] 52: end
# File lib/bio/db/kegg/compound.rb, line 109 109: def enzymes 110: unless @data['ENZYME'] 111: field = fetch('ENZYME') 112: if /\(/.match(field) # old version 113: @data['ENZYME'] = field.scan(/\S+ \(\S+\)/) 114: else 115: @data['ENZYME'] = field.scan(/\S+/) 116: end 117: end 118: @data['ENZYME'] 119: end
FORMULA
# File lib/bio/db/kegg/compound.rb, line 65 65: def formula 66: field_fetch('FORMULA') 67: end
ATOM, BOND
# File lib/bio/db/kegg/compound.rb, line 127 127: def kcf 128: return "#{get('ATOM')}#{get('BOND')}" 129: end
NAME
# File lib/bio/db/kegg/compound.rb, line 55 55: def names 56: field_fetch('NAME').split(/\s*;\s*/) 57: end
PATHWAY
# File lib/bio/db/kegg/compound.rb, line 104 104: def pathways_as_strings 105: lines_fetch('PATHWAY') 106: end