Class Bio::AAindex
In: lib/bio/db/aaindex.rb
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
57:     def self.auto(str)
58:       case str
59:       when /^I /m 
60:         Bio::AAindex1.new(str)
61:       when /^M /m
62:         Bio::AAindex2.new(str)
63:       else
64:         raise
65:       end        
66:     end

[Source]

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

Public Instance methods

Returns authors in the A line.

[Source]

     # File lib/bio/db/aaindex.rb, line 102
102:     def author
103:       if @data['author']
104:         @data['author']
105:       else
106:         @data['author'] = field_fetch('A')
107:       end
108:     end

Returns comment (if any).

[Source]

     # File lib/bio/db/aaindex.rb, line 129
129:     def comment
130:       if @data['comment']
131:         @data['comment']
132:       else
133:         @data['comment'] = field_fetch('*')
134:       end
135:     end

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

[Source]

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

Returns definition in the D line.

[Source]

    # File lib/bio/db/aaindex.rb, line 83
83:     def definition
84:       if @data['definition']
85:         @data['definition']
86:       else
87:         @data['definition'] = field_fetch('D')
88:       end
89:     end

Returns entry_id in the H line.

[Source]

    # File lib/bio/db/aaindex.rb, line 74
74:     def entry_id
75:       if @data['entry_id']
76:         @data['entry_id']
77:       else
78:         @data['entry_id'] = field_fetch('H')
79:       end
80:     end

Returns journal name in the J line.

[Source]

     # File lib/bio/db/aaindex.rb, line 120
120:     def journal
121:       if @data['journal']
122:         @data['journal']
123:       else
124:         @data['journal'] = field_fetch('J')
125:       end
126:     end

Returns title in the T line.

[Source]

     # File lib/bio/db/aaindex.rb, line 111
111:     def title
112:       if @data['title']
113:         @data['title']
114:       else
115:         @data['title'] = field_fetch('T')
116:       end
117:     end

[Validate]