Class: Bio::EMBLDB

Inherits:
DB show all
Defined in:
lib/bio/db.rb,
lib/bio/db/embl/common.rb

Overview

Stores an EMBL style (EMBL, TrEMBL, Swiss-Prot etc.) entry.

Direct Known Subclasses

EMBL, PROSITE, TRANSFAC, UniProtKB

Defined Under Namespace

Modules: Common

Instance Method Summary collapse

Methods inherited from DB

#entry_id, #exists?, #fetch, #get, open, #tags

Constructor Details

#initialize(entry, tagsize) ⇒ EMBLDB

The entire entry is passed as a String. The length of the tag field is passed as an Integer. Parses the entry roughly by the entry2hash method and returns a database object.



306
307
308
309
310
# File 'lib/bio/db.rb', line 306

def initialize(entry, tagsize)
  @tagsize = tagsize
  @orig = entry2hash(entry.strip)	# Hash of the original entry
  @data = {}			# Hash of the parsed entry
end