class Bio::Sequence::DBLink

Bio::Sequence::DBLink stores IDs with the database name. Its main purpose is to store database cross-reference information for a sequence entry.

Attributes

database[R]

Database name, or namespace identifier (String).

id[R]

Primary identifier (String)

secondary_ids[R]

Secondary identifiers (Array of String)

Public Class Methods

new(database, primary_id, *secondary_ids) click to toggle source

creates a new DBLink object

   # File lib/bio/sequence/dblink.rb
19 def initialize(database, primary_id, *secondary_ids)
20   @database = database
21   @id = primary_id
22   @secondary_ids = secondary_ids
23 end
parse_embl_DR_line(str) click to toggle source

Parses DR line in EMBL entry, and returns a DBLink object.

   # File lib/bio/sequence/dblink.rb
39 def self.parse_embl_DR_line(str)
40   str = str.sub(/\.\s*\z/, '')
41   str.sub!(/\ADR   /, '')
42   self.new(*(str.split(/\s*\;\s*/, 3)))
43 end
parse_uniprot_DR_line(str) click to toggle source

Parses DR line in UniProt entry, and returns a DBLink object.

   # File lib/bio/sequence/dblink.rb
46 def self.parse_uniprot_DR_line(str)
47   str = str.sub(/\.\s*\z/, '')
48   str.sub!(/\ADR   /, '')
49   self.new(*(str.split(/\s*\;\s*/)))
50 end