Module | Bio::KEGG::Common::DblinksAsHash |
In: |
lib/bio/db/kegg/common.rb
|
The module providing dblinks_as_hash methods.
Bio::KEGG::* internal use only.
Returns a Hash of the DB name and an Array of entry IDs in DBLINKS field.
# File lib/bio/db/kegg/common.rb, line 33 33: def dblinks_as_hash 34: unless defined? @dblinks_as_hash 35: hash = {} 36: dblinks_as_strings.each do |line| 37: db, ids = line.split(/\:\s*/, 2) 38: list = ids.split(/\s+/) 39: hash[db] = list 40: end 41: @dblinks_as_hash = hash 42: end 43: @dblinks_as_hash 44: end