module Bio::KEGG::Common::ModulesAsHash

This module provides modules_as_hash method.

Bio::KEGG::* internal use only.

Public Instance Methods

modules_as_hash() click to toggle source

Returns MODULE field as a Hash. Each key of the hash is KEGG MODULE ID, and each value is the name of the Pathway Module.


Returns

Hash

    # File lib/bio/db/kegg/common.rb
182 def modules_as_hash
183   unless defined? @modules_s_as_hash then
184     hash = {}
185     modules_as_strings.each do |line|
186       entry_id, name = line.split(/\s+/, 2)
187       hash[entry_id] = name
188     end
189     @modules_as_hash = hash
190   end
191   @modules_as_hash
192 end