Class Bio::AAindex
In: lib/bio/db/aaindex.rb  (CVS)
Parent: KEGGDB

Super class for AAindex1 and AAindex2

Methods

author   auto   comment   dblinks   definition   entry_id   journal   new   title  

Constants

DELIMITER = "\n//\n"   Delimiter
RS = DELIMITER   Delimiter
TAGSIZE = 2   Bio::DB API

Public Class methods

Auto detecter for two AAindex formats. returns a Bio::AAindex1 object or a Bio::AAindex2 object.

[Source]

# File lib/bio/db/aaindex.rb, line 57
    def self.auto(str)
      case str
      when /^I /m 
        Bio::AAindex1.new(str)
      when /^M /m
        Bio::AAindex2.new(str)
      else
        raise
      end        
    end

[Source]

# File lib/bio/db/aaindex.rb, line 69
    def initialize(entry)
      super(entry, TAGSIZE)
    end

Public Instance methods

Returns authors in the A line.

[Source]

# File lib/bio/db/aaindex.rb, line 102
    def author
      if @data['author']
        @data['author']
      else
        @data['author'] = field_fetch('A')
      end
    end

Returns comment (if any).

[Source]

# File lib/bio/db/aaindex.rb, line 129
    def comment
      if @data['comment']
        @data['comment']
      else
        @data['comment'] = field_fetch('*')
      end
    end

Returns database links in the R line. cf.) [‘LIT:123456’, ‘PMID:12345678’]

[Source]

# File lib/bio/db/aaindex.rb, line 93
    def dblinks
      if @data['ref']
        @data['ref']
      else
        @data['ref'] = field_fetch('R').split(' ')
      end
    end

Returns definition in the D line.

[Source]

# File lib/bio/db/aaindex.rb, line 83
    def definition
      if @data['definition']
        @data['definition']
      else
        @data['definition'] = field_fetch('D')
      end
    end

Returns entry_id in the H line.

[Source]

# File lib/bio/db/aaindex.rb, line 74
    def entry_id
      if @data['entry_id']
        @data['entry_id']
      else
        @data['entry_id'] = field_fetch('H')
      end
    end

Returns journal name in the J line.

[Source]

# File lib/bio/db/aaindex.rb, line 120
    def journal
      if @data['journal']
        @data['journal']
      else
        @data['journal'] = field_fetch('J')
      end
    end

Returns title in the T line.

[Source]

# File lib/bio/db/aaindex.rb, line 111
    def title
      if @data['title']
        @data['title']
      else
        @data['title'] = field_fetch('T')
      end
    end

[Validate]