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

## Description

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

## References

- www.genome.jp/kegg/pathway.html
- ftp.genome.jp/pub/kegg/pathway/pathway

### Methods

compounds compounds_as_hash compounds_as_strings dblinks dblinks_as_hash dblinks_as_strings definition description diseases diseases_as_hash diseases_as_strings entry_id enzymes enzymes_as_strings genes genes_as_hash genes_as_strings keggclass ko_pathway modules modules_as_hash modules_as_strings name new organism orthologs orthologs_as_hash orthologs_as_strings pathways pathways_as_hash pathways_as_strings reactions reactions_as_hash reactions_as_strings references rel_pathways rel_pathways_as_hash rel_pathways_as_strings

### Included Modules

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

### Constants

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

### Public Class methods

new(entry)

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_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_as_strings()

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

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

dblinks_as_strings()

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()

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_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

diseases_as_strings()

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

entry_id()

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_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_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_as_strings()

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

keggclass()

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()

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

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

modules_as_strings()

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()

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()

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

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_as_strings()

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

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_as_strings()

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_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_as_strings()

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

references()

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()

Alias for rel_pathways_as_hash

rel_pathways_as_hash()

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

rel_pathways_as_strings()

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]