class Bio::AAindex

Super class for AAindex1 and AAindex2

Constants

DELIMITER

Delimiter

RS

Delimiter

TAGSIZE

Bio::DB API

Public Class Methods

auto(str) click to toggle source

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

# 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
new(entry) click to toggle source
Calls superclass method Bio::NCBIDB.new
# File lib/bio/db/aaindex.rb, line 69
def initialize(entry)
  super(entry, TAGSIZE)
end

Public Instance Methods

author() click to toggle source

Returns authors in the A line.

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

Returns comment (if any).

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

Returns definition in the D line.

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

Returns #entry_id in the H line.

# 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
journal() click to toggle source

Returns journal name in the J line.

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

Returns title in the T line.

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