Class Bio::KEGG::PATHWAY
In: lib/bio/db/kegg/pathway.rb
Parent: KEGGDB

Methods

Included Modules

Common::DblinksAsHash Common::PathwaysAsHash Common::OrthologsAsHash Common::References Common::ModulesAsHash Common::StringsAsHash

Constants

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

Public Class methods

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


Arguments:

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

[Source]

    # File lib/bio/db/kegg/pathway.rb, line 72
72:   def initialize(entry)
73:     super(entry, TAGSIZE)
74:   end

Public Instance methods

compounds()

Alias for compounds_as_hash

Compounds described in the COMPOUND lines.


Returns:Hash of compound ID and its definition

[Source]

     # File lib/bio/db/kegg/pathway.rb, line 212
212:   def compounds_as_hash
213:     unless @compounds_as_hash
214:       @compounds_as_hash = strings_as_hash(compounds_as_strings)
215:     end
216:     @compounds_as_hash
217:   end

Compounds described in the COMPOUND lines.


Returns:Array containing String

[Source]

     # File lib/bio/db/kegg/pathway.rb, line 205
205:   def compounds_as_strings
206:     lines_fetch('COMPOUND')
207:   end
dblinks()

Alias for dblinks_as_hash

Returns a Hash of the DB name and an Array of entry IDs in DBLINKS field.

[Source]

    # File lib/bio/db/kegg/pathway.rb, line 33
33:   def dblinks_as_hash; super; end

Returns an Array of a database name and entry IDs in DBLINKS field.


Returns:Array containing String

[Source]

     # File lib/bio/db/kegg/pathway.rb, line 140
140:   def dblinks_as_strings
141:     lines_fetch('DBLINKS')
142:   end
definition()

Alias for description

Description of the pathway, described in the DESCRIPTION line.


Returns:String

[Source]

    # File lib/bio/db/kegg/pathway.rb, line 93
93:   def description
94:     field_fetch('DESCRIPTION')
95:   end
diseases()

Alias for diseases_as_hash

Diseases described in the DISEASE lines.


Returns:Hash of disease ID and its definition

[Source]

     # File lib/bio/db/kegg/pathway.rb, line 129
129:   def diseases_as_hash
130:     unless @diseases_as_hash
131:       @diseases_as_hash = strings_as_hash(diseases_as_strings)
132:     end
133:     @diseases_as_hash
134:   end

Disease described in the DISEASE lines.


Returns:Array containing String

[Source]

     # File lib/bio/db/kegg/pathway.rb, line 122
122:   def diseases_as_strings
123:     lines_fetch('DISEASE')
124:   end

Return the ID of the pathway, described in the ENTRY line.


Returns:String

[Source]

    # File lib/bio/db/kegg/pathway.rb, line 79
79:   def entry_id
80:     field_fetch('ENTRY')[/\S+/]
81:   end
enzymes()

Alias for enzymes_as_strings

Enzymes described in the ENZYME lines.


Returns:Array containing String

[Source]

     # File lib/bio/db/kegg/pathway.rb, line 179
179:   def enzymes_as_strings
180:     lines_fetch('ENZYME')
181:   end
genes()

Alias for genes_as_hash

Genes described in the GENE lines.


Returns:Hash of gene ID and its definition

[Source]

     # File lib/bio/db/kegg/pathway.rb, line 168
168:   def genes_as_hash
169:     unless @genes_as_hash
170:       @genes_as_hash = strings_as_hash(genes_as_strings)
171:     end
172:     @genes_as_hash
173:   end

Genes described in the GENE lines.


Returns:Array containing String

[Source]

     # File lib/bio/db/kegg/pathway.rb, line 161
161:   def genes_as_strings
162:     lines_fetch('GENE')
163:   end

Return the name of the KEGG class, described in the CLASS line.


Returns:String

[Source]

     # File lib/bio/db/kegg/pathway.rb, line 101
101:   def keggclass
102:     field_fetch('CLASS')
103:   end

KO pathway described in the KO_PATHWAY line.


Returns:String

[Source]

     # File lib/bio/db/kegg/pathway.rb, line 247
247:   def ko_pathway
248:     field_fetch('KO_PATHWAY')
249:   end
modules()

Alias for modules_as_hash

Returns MODULE field as a Hash. Each key of the hash is KEGG MODULE ID, and each value is the name of the Pathway Module.


Returns:Hash

[Source]

    # File lib/bio/db/kegg/pathway.rb, line 59
59:   def modules_as_hash; super; end

Returns MODULE field of the entry.


Returns:Array containing String objects

[Source]

     # File lib/bio/db/kegg/pathway.rb, line 115
115:   def modules_as_strings
116:     lines_fetch('MODULE')
117:   end

Name of the pathway, described in the NAME line.


Returns:String

[Source]

    # File lib/bio/db/kegg/pathway.rb, line 86
86:   def name
87:     field_fetch('NAME')
88:   end

Organism described in the ORGANISM line.


Returns:String

[Source]

     # File lib/bio/db/kegg/pathway.rb, line 154
154:   def organism
155:     field_fetch('ORGANISM')
156:   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/pathway.rb, line 43
43:   def orthologs_as_hash; super; end

Orthologs described in the ORTHOLOGY lines.


Returns:Array containing String

[Source]

     # File lib/bio/db/kegg/pathway.rb, line 147
147:   def orthologs_as_strings
148:     lines_fetch('ORTHOLOGY')
149:   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/pathway.rb, line 38
38:   def pathways_as_hash; super; end

Pathways described in the PATHWAY_MAP lines.


Returns:Array containing String

[Source]

     # File lib/bio/db/kegg/pathway.rb, line 108
108:   def pathways_as_strings
109:     lines_fetch('PATHWAY_MAP')
110:   end
reactions()

Alias for reactions_as_hash

Reactions described in the REACTION lines.


Returns:Hash of reaction ID and its definition

[Source]

     # File lib/bio/db/kegg/pathway.rb, line 194
194:   def reactions_as_hash
195:     unless @reactions_as_hash
196:       @reactions_as_hash = strings_as_hash(reactions_as_strings)
197:     end
198:     @reactions_as_hash
199:   end

Reactions described in the REACTION lines.


Returns:Array containing String

[Source]

     # File lib/bio/db/kegg/pathway.rb, line 187
187:   def reactions_as_strings
188:     lines_fetch('REACTION')
189:   end

REFERENCE — Returns contents of the REFERENCE records as an Array of Bio::Reference objects.


Returns:an Array containing Bio::Reference objects

[Source]

    # File lib/bio/db/kegg/pathway.rb, line 51
51:   def references; super; end
rel_pathways()

Returns REL_PATHWAY field as a Hash. Each key of the hash is Pathway ID, and each value is the name of the pathway.


Returns:Hash

[Source]

     # File lib/bio/db/kegg/pathway.rb, line 231
231:   def rel_pathways_as_hash
232:     unless defined? @rel_pathways_as_hash then
233:       hash = {}
234:       rel_pathways_as_strings.each do |line|
235:         entry_id, name = line.split(/\s+/, 2)
236:         hash[entry_id] = name
237:       end
238:       @rel_pathways_as_hash = hash
239:     end
240:     @rel_pathways_as_hash
241:   end

Returns REL_PATHWAY field of the entry.


Returns:Array containing String objects

[Source]

     # File lib/bio/db/kegg/pathway.rb, line 223
223:   def rel_pathways_as_strings
224:     lines_fetch('REL_PATHWAY')
225:   end

[Validate]