module Bio::KEGG::Common::PathwaysAsHash

The module providing pathways_as_hash method.

Bio::KEGG::* internal use only.

Public Instance Methods

pathways_as_hash() click to toggle source

Returns a Hash of the pathway ID and name in PATHWAY field.

    # File lib/bio/db/kegg/common.rb
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