Module Bio::KEGG::Common::ModulesAsHash
In: lib/bio/db/kegg/common.rb

This module provides modules_as_hash method.

Bio::KEGG::* internal use only.

Methods

Public Instance methods

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

[Source]

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

[Validate]