Class | Bio::KEGG::COMPOUND |
In: |
lib/bio/db/kegg/compound.rb
|
Parent: | KEGGDB |
DELIMITER | = | RS = "\n///\n" |
TAGSIZE | = | 12 |
# File lib/bio/db/kegg/compound.rb, line 20 20: def initialize(entry) 21: super(entry, TAGSIZE) 22: end
COMMENT
# File lib/bio/db/kegg/compound.rb, line 106 106: def comment 107: field_fetch('COMMENT') 108: end
DBLINKS
# File lib/bio/db/kegg/compound.rb, line 96 96: def dblinks 97: lines_fetch('DBLINKS') 98: end
ENTRY
# File lib/bio/db/kegg/compound.rb, line 25 25: def entry_id 26: field_fetch('ENTRY')[/\S+/] 27: end
# File lib/bio/db/kegg/compound.rb, line 83 83: def enzymes 84: unless @data['ENZYME'] 85: field = fetch('ENZYME') 86: if /\(/.match(field) # old version 87: @data['ENZYME'] = field.scan(/\S+ \(\S+\)/) 88: else 89: @data['ENZYME'] = field.scan(/\S+/) 90: end 91: end 92: @data['ENZYME'] 93: end
FORMULA
# File lib/bio/db/kegg/compound.rb, line 39 39: def formula 40: field_fetch('FORMULA') 41: end
ATOM, BOND
# File lib/bio/db/kegg/compound.rb, line 101 101: def kcf 102: return "#{get('ATOM')}#{get('BOND')}" 103: end
NAME
# File lib/bio/db/kegg/compound.rb, line 30 30: def names 31: field_fetch('NAME').split(/\s*;\s*/) 32: end
PATHWAY
# File lib/bio/db/kegg/compound.rb, line 78 78: def pathways 79: lines_fetch('PATHWAY') 80: end