Module | Bio::KEGG::Common::PathwaysAsHash |
In: |
lib/bio/db/kegg/common.rb
|
The module providing pathways_as_hash method.
Bio::KEGG::* internal use only.
Returns a Hash of the pathway ID and name in PATHWAY field.
# File lib/bio/db/kegg/common.rb, line 116 116: def pathways_as_hash 117: unless defined? @pathways_as_hash then 118: hash = {} 119: pathways_as_strings.each do |line| 120: line = line.sub(/\APATH\:\s+/, '') 121: entry_id, name = line.split(/\s+/, 2) 122: hash[entry_id] = name 123: end 124: @pathways_as_hash = hash 125: end 126: @pathways_as_hash 127: end