class Bio::KEGG::MODULE

Description

Bio::KEGG::MODULE is a parser class for the KEGG MODULE database entry.

References

Constants

DELIMITER
TAGSIZE

Public Class Methods

new(entry) click to toggle source

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


Arguments:

  • (required) entry: (String) single entry as a string

Returns

Bio::KEGG::MODULE object

Calls superclass method Bio::NCBIDB::new
   # File lib/bio/db/kegg/module.rb
40 def initialize(entry)
41   super(entry, TAGSIZE)
42 end

Public Instance Methods

compounds()
Alias for: compounds_as_hash
compounds_as_hash() click to toggle source

Compounds described in the COMPOUND lines.


Returns

Hash of compound ID and its definition

    # File lib/bio/db/kegg/module.rb
146 def compounds_as_hash
147   unless (defined? @compounds_as_hash) && @compounds_as_hash
148     @compounds_as_hash = strings_as_hash(compounds_as_strings)
149   end
150   @compounds_as_hash
151 end
Also aliased as: compounds
compounds_as_strings() click to toggle source

Compounds described in the COMPOUND lines.


Returns

Array containing String

    # File lib/bio/db/kegg/module.rb
139 def compounds_as_strings
140   lines_fetch('COMPOUND')
141 end
definition() click to toggle source

Definition of the module, described in the DEFINITION line.


Returns

String

   # File lib/bio/db/kegg/module.rb
61 def definition
62   field_fetch('DEFINITION')
63 end
entry_id() click to toggle source

Return the ID, described in the ENTRY line.


Returns

String

   # File lib/bio/db/kegg/module.rb
47 def entry_id
48   field_fetch('ENTRY')[/\S+/]
49 end
keggclass() click to toggle source

Name of the KEGG class, described in the CLASS line.


Returns

String

   # File lib/bio/db/kegg/module.rb
68 def keggclass
69   field_fetch('CLASS')
70 end
name() click to toggle source

Name of the module, described in the NAME line.


Returns

String

   # File lib/bio/db/kegg/module.rb
54 def name
55   field_fetch('NAME')
56 end
orthologs()
Alias for: orthologs_as_hash
orthologs_as_array() click to toggle source

All KO IDs in the ORTHOLOGY lines.


Returns

Array of orthology IDs

    # File lib/bio/db/kegg/module.rb
112 def orthologs_as_array
113   orthologs_as_hash.keys.map{|x| x.split(/\+|\-|,/)}.flatten.sort.uniq
114 end
orthologs_as_hash() click to toggle source

Orthologs described in the ORTHOLOGY lines.


Returns

Hash of orthology ID and its definition

    # File lib/bio/db/kegg/module.rb
101 def orthologs_as_hash
102   unless (defined? @orthologs_as_hash) && @orthologs_as_hash
103     @orthologs_as_hash = strings_as_hash(orthologs_as_strings)
104   end
105   @orthologs_as_hash
106 end
Also aliased as: orthologs
orthologs_as_strings() click to toggle source

Orthologs described in the ORTHOLOGY lines.


Returns

Array containing String

   # File lib/bio/db/kegg/module.rb
94 def orthologs_as_strings
95   lines_fetch('ORTHOLOGY')
96 end
pathways()
Alias for: pathways_as_hash
pathways_as_hash() click to toggle source

Pathways described in the PATHWAY lines.


Returns

Hash of pathway ID and its definition

   # File lib/bio/db/kegg/module.rb
82 def pathways_as_hash
83   unless (defined? @pathways_as_hash) && @pathways_as_hash
84     @pathways_as_hash = strings_as_hash(pathways_as_strings)
85   end
86   @pathways_as_hash
87 end
Also aliased as: pathways
pathways_as_strings() click to toggle source

Pathways described in the PATHWAY lines.


Returns

Array containing String

   # File lib/bio/db/kegg/module.rb
75 def pathways_as_strings
76   lines_fetch('PATHWAY')
77 end
reactions()
Alias for: reactions_as_hash
reactions_as_hash() click to toggle source

Reactions described in the REACTION lines.


Returns

Hash of reaction ID and its definition

    # File lib/bio/db/kegg/module.rb
127 def reactions_as_hash
128   unless (defined? @reactions_as_hash) && @reactions_as_hash
129     @reactions_as_hash = strings_as_hash(reactions_as_strings)
130   end
131   @reactions_as_hash
132 end
Also aliased as: reactions
reactions_as_strings() click to toggle source

Reactions described in the REACTION lines.


Returns

Array containing String

    # File lib/bio/db/kegg/module.rb
120 def reactions_as_strings
121   lines_fetch('REACTION')
122 end