Module: Bio::KEGG::Common::OrthologsAsHash
Overview
This module provides orthologs_as_hash method.
Bio::KEGG::* internal use only.
Instance Method Summary collapse
-
#orthologs_as_hash ⇒ Object
Returns a Hash of the orthology ID and definition in ORTHOLOGY field.
Instance Method Details
#orthologs_as_hash ⇒ Object
Returns a Hash of the orthology ID and definition in ORTHOLOGY field.
136 137 138 139 140 141 142 143 144 145 146 147 |
# File 'lib/bio/db/kegg/common.rb', line 136 def orthologs_as_hash unless defined? @orthologs_as_hash kos = {} orthologs_as_strings.each do |line| ko = line.sub(/\AKO\:\s+/, '') entry_id, definition = ko.split(/\s+/, 2) kos[entry_id] = definition end @orthologs_as_hash = kos end @orthologs_as_hash end |