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
Creates a new Bio::KEGG::PATHWAY object.
Arguments:
-
(required) entry: (String) single entry as a string
- Returns
-
Bio::KEGG::PATHWAY object
# File lib/bio/db/kegg/pathway.rb, line 72 def initialize(entry) super(entry, TAGSIZE) end
Public Instance Methods
Compounds described in the COMPOUND lines.
- Returns
-
Hash of compound ID and its definition
# File lib/bio/db/kegg/pathway.rb, line 212 def compounds_as_hash unless @compounds_as_hash @compounds_as_hash = strings_as_hash(compounds_as_strings) end @compounds_as_hash end
Returns a Hash of the DB name and an Array of entry IDs in DBLINKS field.
# File lib/bio/db/kegg/pathway.rb, line 33 def dblinks_as_hash; super; end
Returns an Array of a database name and entry IDs in DBLINKS field.
- Returns
-
Array containing String
# File lib/bio/db/kegg/pathway.rb, line 140 def dblinks_as_strings lines_fetch('DBLINKS') end
Description of the pathway, described in the DESCRIPTION line.
- Returns
# File lib/bio/db/kegg/pathway.rb, line 93 def description field_fetch('DESCRIPTION') end
Diseases described in the DISEASE lines.
- Returns
-
Hash of disease ID and its definition
# File lib/bio/db/kegg/pathway.rb, line 129 def diseases_as_hash unless @diseases_as_hash @diseases_as_hash = strings_as_hash(diseases_as_strings) end @diseases_as_hash end
Disease described in the DISEASE lines.
- Returns
-
Array containing String
# File lib/bio/db/kegg/pathway.rb, line 122 def diseases_as_strings lines_fetch('DISEASE') end
Return the ID of the pathway, described in the ENTRY line.
- Returns
# File lib/bio/db/kegg/pathway.rb, line 79 def entry_id field_fetch('ENTRY')[/\S+/] end
Enzymes described in the ENZYME lines.
- Returns
-
Array containing String
# File lib/bio/db/kegg/pathway.rb, line 179 def enzymes_as_strings lines_fetch('ENZYME') end
Genes described in the GENE lines.
- Returns
-
Hash of gene ID and its definition
# File lib/bio/db/kegg/pathway.rb, line 168 def genes_as_hash unless @genes_as_hash @genes_as_hash = strings_as_hash(genes_as_strings) end @genes_as_hash end
Genes described in the GENE lines.
- Returns
-
Array containing String
# File lib/bio/db/kegg/pathway.rb, line 161 def genes_as_strings lines_fetch('GENE') end
KO pathway described in the KO_PATHWAY line.
- Returns
# File lib/bio/db/kegg/pathway.rb, line 247 def ko_pathway field_fetch('KO_PATHWAY') end
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
# File lib/bio/db/kegg/pathway.rb, line 59 def modules_as_hash; super; end
Name of the pathway, described in the NAME line.
- Returns
# File lib/bio/db/kegg/pathway.rb, line 86 def name field_fetch('NAME') end
Organism described in the ORGANISM line.
- Returns
# File lib/bio/db/kegg/pathway.rb, line 154 def organism field_fetch('ORGANISM') end
Returns a Hash of the orthology ID and definition in ORTHOLOGY field.
# File lib/bio/db/kegg/pathway.rb, line 43 def orthologs_as_hash; super; end
Returns a Hash of the pathway ID and name in PATHWAY field.
# File lib/bio/db/kegg/pathway.rb, line 38 def pathways_as_hash; super; end
Pathways described in the PATHWAY_MAP lines.
- Returns
-
Array containing String
# File lib/bio/db/kegg/pathway.rb, line 108 def pathways_as_strings lines_fetch('PATHWAY_MAP') end
Reactions described in the REACTION lines.
- Returns
-
Hash of reaction ID and its definition
# File lib/bio/db/kegg/pathway.rb, line 194 def reactions_as_hash unless @reactions_as_hash @reactions_as_hash = strings_as_hash(reactions_as_strings) end @reactions_as_hash end
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 51 def references; super; end
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
# File lib/bio/db/kegg/pathway.rb, line 231 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
Returns REL_PATHWAY field of the entry.
- Returns
-
Array containing String objects
# File lib/bio/db/kegg/pathway.rb, line 223 def rel_pathways_as_strings lines_fetch('REL_PATHWAY') end