Class Bio::KEGG::REACTION
In: lib/bio/db/kegg/reaction.rb
Parent: KEGGDB

Methods

Included Modules

Common::PathwaysAsHash Common::OrthologsAsHash

Constants

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

Public Class methods

Creates a new Bio::KEGG::REACTION object.


Arguments:

  • (required) entry: (String) single entry as a string
Returns:Bio::KEGG::REACTION object

[Source]

    # File lib/bio/db/kegg/reaction.rb, line 38
38:   def initialize(entry)
39:     super(entry, TAGSIZE)
40:   end

Public Instance methods

Definition of the reaction, described in the DEFINITION line.


Returns:String

[Source]

    # File lib/bio/db/kegg/reaction.rb, line 59
59:   def definition
60:     field_fetch('DEFINITION')
61:   end

ID of the entry, described in the ENTRY line.


Returns:String

[Source]

    # File lib/bio/db/kegg/reaction.rb, line 45
45:   def entry_id
46:     field_fetch('ENTRY')[/\S+/]
47:   end

Enzymes described in the ENZYME line.


Returns:Array containing String

[Source]

     # File lib/bio/db/kegg/reaction.rb, line 117
117:   def enzymes
118:     unless @data['ENZYME']
119:       @data['ENZYME'] = fetch('ENZYME').scan(/\S+/)
120:     end
121:     @data['ENZYME']
122:   end

Chemical equation, described in the EQUATION line.


Returns:String

[Source]

    # File lib/bio/db/kegg/reaction.rb, line 66
66:   def equation
67:     field_fetch('EQUATION')
68:   end

Name of the reaction, described in the NAME line.


Returns:String

[Source]

    # File lib/bio/db/kegg/reaction.rb, line 52
52:   def name
53:     field_fetch('NAME')
54:   end
orthologs()

Alias for orthologs_as_hash

Returns a Hash of the orthology ID and definition in ORTHOLOGY field.

[Source]

    # File lib/bio/db/kegg/reaction.rb, line 30
30:   def orthologs_as_hash; super; end

Orthologs described in the ORTHOLOGY lines.


Returns:Array containing String

[Source]

     # File lib/bio/db/kegg/reaction.rb, line 127
127:   def orthologs_as_strings
128:     lines_fetch('ORTHOLOGY')
129:   end
pathways()

Alias for pathways_as_hash

Returns a Hash of the pathway ID and name in PATHWAY field.

[Source]

    # File lib/bio/db/kegg/reaction.rb, line 25
25:   def pathways_as_hash; super; end

Pathway information, described in the PATHWAY lines.


Returns:Array containing String

[Source]

     # File lib/bio/db/kegg/reaction.rb, line 110
110:   def pathways_as_strings
111:     lines_fetch('PATHWAY')
112:   end
rpairs()

Alias for rpairs_as_hash

KEGG RPAIR (ReactantPair) information, described in the RPAIR lines. Returns a hash of RPair IDs and [ name, type ] informations, for example,

  { "RP12733" => [ "C00022_C00900", "trans" ],
    "RP05698" => [ "C00011_C00022", "leave" ],
    "RP00440" => [ "C00022_C00900", "main" ]
  }

Returns:Hash

[Source]

    # File lib/bio/db/kegg/reaction.rb, line 85
85:   def rpairs_as_hash
86:     unless defined? @rpairs_as_hash
87:       rps = {}
88:       rpairs_as_strings.each do |line|
89:         namespace, entry_id, name, rptype = line.split(/\s+/)
90:         rps[entry_id] = [ name, rptype ]
91:       end
92:       @rpairs_as_hash = rps
93:     end
94:     @rpairs_as_hash
95:   end

KEGG RPAIR (ReactantPair) information, described in the RPAIR lines.


Returns:Array containing String

[Source]

    # File lib/bio/db/kegg/reaction.rb, line 73
73:   def rpairs_as_strings
74:     lines_fetch('RPAIR')
75:   end

Returns the content of the RPAIR entry as tokens (RPair signature, RPair ID, , RPair type).


Returns:Array containing String

[Source]

     # File lib/bio/db/kegg/reaction.rb, line 103
103:   def rpairs_as_tokens
104:     fetch('RPAIR').split(/\s+/)
105:   end

[Validate]