Class | Bio::Sequence::DBLink
In: | lib/bio/sequence/dblink.rb
Parent: | Object

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

### Methods

new parse_embl_DR_line parse_uniprot_DR_line

### 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)

creates a new DBLink object

[Source]

        # File lib/bio/sequence/dblink.rb, line 19
    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)

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

[Source]

        # File lib/bio/sequence/dblink.rb, line 39
    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)

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

[Source]

        # File lib/bio/sequence/dblink.rb, line 46
    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

[Validate]