KEGGDB
COMPOSITION
# File lib/bio/db/kegg/glycan.rb, line 51 def composition unless @data['COMPOSITION'] hash = Hash.new(0) fetch('COMPOSITION').scan(/\((\S+)\)(\d+)/).each do |key, val| hash[key] = val.to_i end @data['COMPOSITION'] = hash end @data['COMPOSITION'] end
# File lib/bio/db/kegg/glycan.rb, line 76 def compounds unless @data['COMPOUND'] @data['COMPOUND'] = fetch('COMPOUND').split(/\s+/) end @data['COMPOUND'] end
Returns a Hash of the DB name and an Array of entry IDs in DBLINKS field.
# File lib/bio/db/kegg/glycan.rb, line 23 def dblinks_as_hash; super; end
DBLINKS
# File lib/bio/db/kegg/glycan.rb, line 145 def dblinks_as_strings unless @data['DBLINKS'] @data['DBLINKS'] = lines_fetch('DBLINKS') end @data['DBLINKS'] end
ENTRY
# File lib/bio/db/kegg/glycan.rb, line 41 def entry_id field_fetch('ENTRY')[/\S+/] end
# File lib/bio/db/kegg/glycan.rb, line 97 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
ATOM, BOND
# File lib/bio/db/kegg/glycan.rb, line 153 def kcf return "#{get('NODE')}#{get('EDGE')}" end
CLASS
# File lib/bio/db/kegg/glycan.rb, line 71 def keggclass field_fetch('CLASS') end
MASS
# File lib/bio/db/kegg/glycan.rb, line 63 def mass unless @data['MASS'] @data['MASS'] = field_fetch('MASS')[/[\d\.]+/].to_f end @data['MASS'] end
NAME
# File lib/bio/db/kegg/glycan.rb, line 46 def name field_fetch('NAME') end
Returns a Hash of the orthology ID and definition in ORTHOLOGY field.
# File lib/bio/db/kegg/glycan.rb, line 33 def orthologs_as_hash; super; end
# File lib/bio/db/kegg/glycan.rb, line 110 def orthologs_as_strings unless @data['ORTHOLOGY'] @data['ORTHOLOGY'] = lines_fetch('ORTHOLOGY') end @data['ORTHOLOGY'] end
Returns a Hash of the pathway ID and name in PATHWAY field.
# File lib/bio/db/kegg/glycan.rb, line 28 def pathways_as_hash; super; end
# File lib/bio/db/kegg/glycan.rb, line 92 def pathways_as_strings lines_fetch('PATHWAY') end
# File lib/bio/db/kegg/glycan.rb, line 84 def reactions unless @data['REACTION'] @data['REACTION'] = fetch('REACTION').split(/\s+/) end @data['REACTION'] end
REFERENCE
# File lib/bio/db/kegg/glycan.rb, line 128 def references unless @data['REFERENCE'] ary = Array.new lines = lines_fetch('REFERENCE') lines.each do |line| if /^\d+\s+\[PMID/.match(line) ary << line else ary.last << " #{line.strip}" end end @data['REFERENCE'] = ary end @data['REFERENCE'] end
Generated with the Darkfish Rdoc Generator 2.
COMMENT