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

This module provides orthologs_as_hash method.

Bio::KEGG::* internal use only.

Methods

Public Instance methods

Returns a Hash of the orthology ID and definition in ORTHOLOGY field.

[Source]

     # File lib/bio/db/kegg/common.rb, line 136
136:       def orthologs_as_hash
137:         unless defined? @orthologs_as_hash
138:           kos = {}
139:           orthologs_as_strings.each do |line|
140:             ko = line.sub(/\AKO\:\s+/, '')
141:             entry_id, definition = ko.split(/\s+/, 2)
142:             kos[entry_id] = definition
143:           end
144:           @orthologs_as_hash = kos
145:         end
146:         @orthologs_as_hash
147:       end

[Validate]