Class Bio::KEGG::COMPOUND
In: lib/bio/db/kegg/compound.rb
Parent: KEGGDB

Methods

comment   dblinks   entry_id   enzymes   formula   glycans   kcf   mass   name   names   new   pathways   reactions   remark   rpairs  

Constants

DELIMITER = RS = "\n///\n"
TAGSIZE = 12

Public Class methods

[Source]

    # File lib/bio/db/kegg/compound.rb, line 20
20:   def initialize(entry)
21:     super(entry, TAGSIZE)
22:   end

Public Instance methods

COMMENT

[Source]

     # File lib/bio/db/kegg/compound.rb, line 106
106:   def comment
107:     field_fetch('COMMENT')
108:   end

DBLINKS

[Source]

    # File lib/bio/db/kegg/compound.rb, line 96
96:   def dblinks
97:     lines_fetch('DBLINKS')
98:   end

ENTRY

[Source]

    # File lib/bio/db/kegg/compound.rb, line 25
25:   def entry_id
26:     field_fetch('ENTRY')[/\S+/]
27:   end

ENZYME

[Source]

    # File lib/bio/db/kegg/compound.rb, line 83
83:   def enzymes
84:     unless @data['ENZYME']
85:       field = fetch('ENZYME')
86:       if /\(/.match(field)      # old version
87:         @data['ENZYME'] = field.scan(/\S+ \(\S+\)/)
88:       else
89:         @data['ENZYME'] = field.scan(/\S+/)
90:       end
91:     end
92:     @data['ENZYME']
93:   end

FORMULA

[Source]

    # File lib/bio/db/kegg/compound.rb, line 39
39:   def formula
40:     field_fetch('FORMULA')
41:   end

GLYCAN

[Source]

    # File lib/bio/db/kegg/compound.rb, line 54
54:   def glycans
55:     unless @data['GLYCAN']
56:       @data['GLYCAN'] = fetch('GLYCAN').split(/\s+/)
57:     end
58:     @data['GLYCAN']
59:   end

ATOM, BOND

[Source]

     # File lib/bio/db/kegg/compound.rb, line 101
101:   def kcf
102:     return "#{get('ATOM')}#{get('BOND')}"
103:   end

MASS

[Source]

    # File lib/bio/db/kegg/compound.rb, line 44
44:   def mass
45:     field_fetch('MASS').to_f
46:   end

[Source]

    # File lib/bio/db/kegg/compound.rb, line 34
34:   def name
35:     names.first
36:   end

NAME

[Source]

    # File lib/bio/db/kegg/compound.rb, line 30
30:   def names
31:     field_fetch('NAME').split(/\s*;\s*/)
32:   end

PATHWAY

[Source]

    # File lib/bio/db/kegg/compound.rb, line 78
78:   def pathways
79:     lines_fetch('PATHWAY') 
80:   end

REACTION

[Source]

    # File lib/bio/db/kegg/compound.rb, line 62
62:   def reactions
63:     unless @data['REACTION']
64:       @data['REACTION'] = fetch('REACTION').split(/\s+/)
65:     end
66:     @data['REACTION']
67:   end

REMARK

[Source]

    # File lib/bio/db/kegg/compound.rb, line 49
49:   def remark
50:     field_fetch('REMARK')
51:   end

RPAIR

[Source]

    # File lib/bio/db/kegg/compound.rb, line 70
70:   def rpairs
71:     unless @data['RPAIR']
72:       @data['RPAIR'] = fetch('RPAIR').split(/\s+/)
73:     end
74:     @data['RPAIR']
75:   end

[Validate]