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, line 19
def initialize(database, primary_id, *secondary_ids)
  @database = database
  @id = primary_id
  @secondary_ids = secondary_ids
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, line 39
def self.parse_embl_DR_line(str)
  str = str.sub(/\.\s*\z/, '')
  str.sub!(/\ADR   /, '')
  self.new(*(str.split(/\s*\;\s*/, 3)))
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, line 46
def self.parse_uniprot_DR_line(str)
  str = str.sub(/\.\s*\z/, '')
  str.sub!(/\ADR   /, '')
  self.new(*(str.split(/\s*\;\s*/)))
end