class Bio::KEGG::PATHWAY

Description

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

References

Constants

DELIMITER
TAGSIZE

Public Class Methods

new(entry) click to toggle source

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


Arguments:

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

Returns

Bio::KEGG::PATHWAY object

Calls superclass method Bio::NCBIDB.new
# File lib/bio/db/kegg/pathway.rb, line 71
def initialize(entry)
  super(entry, TAGSIZE)
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/pathway.rb, line 211
def compounds_as_hash
  unless (defined? @compounds_as_hash) && @compounds_as_hash
    @compounds_as_hash = strings_as_hash(compounds_as_strings)
  end
  @compounds_as_hash
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/pathway.rb, line 204
def compounds_as_strings
  lines_fetch('COMPOUND')
end
definition()
Alias for: description
description() click to toggle source

Description of the pathway, described in the DESCRIPTION line.


Returns

String

# File lib/bio/db/kegg/pathway.rb, line 92
def description
  field_fetch('DESCRIPTION')
end
Also aliased as: definition
diseases()
Alias for: diseases_as_hash
diseases_as_hash() click to toggle source

Diseases described in the DISEASE lines.


Returns

Hash of disease ID and its definition

# File lib/bio/db/kegg/pathway.rb, line 128
def diseases_as_hash
  unless (defined? @diseases_as_hash) && @diseases_as_hash
    @diseases_as_hash = strings_as_hash(diseases_as_strings)
  end
  @diseases_as_hash
end
Also aliased as: diseases
diseases_as_strings() click to toggle source

Disease described in the DISEASE lines.


Returns

Array containing String

# File lib/bio/db/kegg/pathway.rb, line 121
def diseases_as_strings
  lines_fetch('DISEASE')
end
entry_id() click to toggle source

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


Returns

String

# File lib/bio/db/kegg/pathway.rb, line 78
def entry_id
  field_fetch('ENTRY')[/\S+/]
end
enzymes()
Alias for: enzymes_as_strings
enzymes_as_strings() click to toggle source

Enzymes described in the ENZYME lines.


Returns

Array containing String

# File lib/bio/db/kegg/pathway.rb, line 178
def enzymes_as_strings
  lines_fetch('ENZYME')
end
Also aliased as: enzymes
genes()
Alias for: genes_as_hash
genes_as_hash() click to toggle source

Genes described in the GENE lines.


Returns

Hash of gene ID and its definition

# File lib/bio/db/kegg/pathway.rb, line 167
def genes_as_hash
  unless (defined? @genes_as_hash) && @genes_as_hash
    @genes_as_hash = strings_as_hash(genes_as_strings)
  end
  @genes_as_hash
end
Also aliased as: genes
genes_as_strings() click to toggle source

Genes described in the GENE lines.


Returns

Array containing String

# File lib/bio/db/kegg/pathway.rb, line 160
def genes_as_strings
  lines_fetch('GENE')
end
keggclass() click to toggle source

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


Returns

String

# File lib/bio/db/kegg/pathway.rb, line 100
def keggclass
  field_fetch('CLASS')
end
ko_pathway() click to toggle source

KO pathway described in the KO_PATHWAY line.


Returns

String

# File lib/bio/db/kegg/pathway.rb, line 246
def ko_pathway
  field_fetch('KO_PATHWAY')
end
modules()
Alias for: modules_as_hash
modules_as_hash() click to toggle source

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

# File lib/bio/db/kegg/pathway.rb, line 58
def modules_as_hash; super; end
Also aliased as: modules
modules_as_strings() click to toggle source

Returns MODULE field of the entry.


Returns

Array containing String objects

# File lib/bio/db/kegg/pathway.rb, line 114
def modules_as_strings
  lines_fetch('MODULE')
end
name() click to toggle source

Name of the pathway, described in the NAME line.


Returns

String

# File lib/bio/db/kegg/pathway.rb, line 85
def name
  field_fetch('NAME')
end
organism() click to toggle source

Organism described in the ORGANISM line.


Returns

String

# File lib/bio/db/kegg/pathway.rb, line 153
def organism
  field_fetch('ORGANISM')
end
orthologs()
Alias for: orthologs_as_hash
orthologs_as_hash() click to toggle source

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

# File lib/bio/db/kegg/pathway.rb, line 42
def orthologs_as_hash; super; 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/pathway.rb, line 146
def orthologs_as_strings
  lines_fetch('ORTHOLOGY')
end
pathways()
Alias for: pathways_as_hash
pathways_as_hash() click to toggle source

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

# File lib/bio/db/kegg/pathway.rb, line 37
def pathways_as_hash; super; end
Also aliased as: pathways
pathways_as_strings() click to toggle source

Pathways described in the PATHWAY_MAP lines.


Returns

Array containing String

# File lib/bio/db/kegg/pathway.rb, line 107
def pathways_as_strings
  lines_fetch('PATHWAY_MAP')
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/pathway.rb, line 193
def reactions_as_hash
  unless (defined? @reactions_as_hash) && @reactions_as_hash
    @reactions_as_hash = strings_as_hash(reactions_as_strings)
  end
  @reactions_as_hash
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/pathway.rb, line 186
def reactions_as_strings
  lines_fetch('REACTION')
end
references() click to toggle source

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


Returns

an Array containing Bio::Reference objects

# File lib/bio/db/kegg/pathway.rb, line 50
def references; super; end
rel_pathways()
rel_pathways_as_hash() click to toggle source

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

# File lib/bio/db/kegg/pathway.rb, line 230
def rel_pathways_as_hash
  unless defined? @rel_pathways_as_hash then
    hash = {}
    rel_pathways_as_strings.each do |line|
      entry_id, name = line.split(/\s+/, 2)
      hash[entry_id] = name
    end
    @rel_pathways_as_hash = hash
  end
  @rel_pathways_as_hash
end
Also aliased as: rel_pathways
rel_pathways_as_strings() click to toggle source

Returns REL_PATHWAY field of the entry.


Returns

Array containing String objects

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