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
Bio::NCBIDB::new
# File lib/bio/db/kegg/pathway.rb 76 def initialize(entry) 77 super(entry, TAGSIZE) 78 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 205 def compounds_as_hash 206 unless (defined? @compounds_as_hash) && @compounds_as_hash 207 @compounds_as_hash = strings_as_hash(compounds_as_strings) 208 end 209 @compounds_as_hash 210 end
Compounds described in the COMPOUND
lines.
- Returns
-
Array containing String
# File lib/bio/db/kegg/pathway.rb 198 def compounds_as_strings 199 lines_fetch('COMPOUND') 200 end
Returns a Hash of the DB
name and an Array of entry IDs in DBLINKS field.
Bio::KEGG::Common::DblinksAsHash#dblinks_as_hash
# File lib/bio/db/kegg/pathway.rb 32 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 133 def dblinks_as_strings 134 lines_fetch('DBLINKS') 135 end
Description of the pathway, described in the DESCRIPTION line.
- Returns
-
String
# File lib/bio/db/kegg/pathway.rb 97 def description 98 field_fetch('DESCRIPTION') 99 end
Returns a Hash of the disease ID and its definition
Bio::KEGG::Common::DiseasesAsHash#diseases_as_hash
# File lib/bio/db/kegg/pathway.rb 47 def diseases_as_hash; super; end
Disease described in the DISEASE lines.
- Returns
-
Array containing String
# File lib/bio/db/kegg/pathway.rb 126 def diseases_as_strings 127 lines_fetch('DISEASE') 128 end
Return the ID of the pathway, described in the ENTRY line.
- Returns
-
String
# File lib/bio/db/kegg/pathway.rb 83 def entry_id 84 field_fetch('ENTRY')[/\S+/] 85 end
Enzymes described in the ENZYME
lines.
- Returns
-
Array containing String
# File lib/bio/db/kegg/pathway.rb 172 def enzymes_as_strings 173 lines_fetch('ENZYME') 174 end
Genes described in the GENE lines.
- Returns
-
Hash of gene ID and its definition
# File lib/bio/db/kegg/pathway.rb 161 def genes_as_hash 162 unless (defined? @genes_as_hash) && @genes_as_hash 163 @genes_as_hash = strings_as_hash(genes_as_strings) 164 end 165 @genes_as_hash 166 end
Genes described in the GENE lines.
- Returns
-
Array containing String
# File lib/bio/db/kegg/pathway.rb 154 def genes_as_strings 155 lines_fetch('GENE') 156 end
Return the name of the KEGG
class, described in the CLASS line.
- Returns
-
String
# File lib/bio/db/kegg/pathway.rb 105 def keggclass 106 field_fetch('CLASS') 107 end
KO pathway described in the KO_PATHWAY line.
- Returns
-
String
# File lib/bio/db/kegg/pathway.rb 240 def ko_pathway 241 field_fetch('KO_PATHWAY') 242 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
-
Hash
Bio::KEGG::Common::ModulesAsHash#modules_as_hash
# File lib/bio/db/kegg/pathway.rb 63 def modules_as_hash; super; end
Returns MODULE
field of the entry.
- Returns
-
Array containing String objects
# File lib/bio/db/kegg/pathway.rb 119 def modules_as_strings 120 lines_fetch('MODULE') 121 end
Name of the pathway, described in the NAME line.
- Returns
-
String
# File lib/bio/db/kegg/pathway.rb 90 def name 91 field_fetch('NAME') 92 end
Organism described in the ORGANISM line.
- Returns
-
String
# File lib/bio/db/kegg/pathway.rb 147 def organism 148 field_fetch('ORGANISM') 149 end
Returns a Hash of the orthology ID and definition in ORTHOLOGY
field.
Bio::KEGG::Common::OrthologsAsHash#orthologs_as_hash
# File lib/bio/db/kegg/pathway.rb 42 def orthologs_as_hash; super; end
Orthologs described in the ORTHOLOGY
lines.
- Returns
-
Array containing String
# File lib/bio/db/kegg/pathway.rb 140 def orthologs_as_strings 141 lines_fetch('ORTHOLOGY') 142 end
Returns a Hash of the pathway ID and name in PATHWAY
field.
Bio::KEGG::Common::PathwaysAsHash#pathways_as_hash
# File lib/bio/db/kegg/pathway.rb 37 def pathways_as_hash; super; end
Pathways described in the PATHWAY_MAP lines.
- Returns
-
Array containing String
# File lib/bio/db/kegg/pathway.rb 112 def pathways_as_strings 113 lines_fetch('PATHWAY_MAP') 114 end
Reactions described in the REACTION
lines.
- Returns
-
Hash of reaction ID and its definition
# File lib/bio/db/kegg/pathway.rb 187 def reactions_as_hash 188 unless (defined? @reactions_as_hash) && @reactions_as_hash 189 @reactions_as_hash = strings_as_hash(reactions_as_strings) 190 end 191 @reactions_as_hash 192 end
Reactions described in the REACTION
lines.
- Returns
-
Array containing String
# File lib/bio/db/kegg/pathway.rb 180 def reactions_as_strings 181 lines_fetch('REACTION') 182 end
REFERENCE – Returns contents of the REFERENCE records as an Array of Bio::Reference
objects.
- Returns
-
an Array containing
Bio::Reference
objects
Bio::KEGG::Common::References#references
# File lib/bio/db/kegg/pathway.rb 55 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
-
Hash
# File lib/bio/db/kegg/pathway.rb 224 def rel_pathways_as_hash 225 unless defined? @rel_pathways_as_hash then 226 hash = {} 227 rel_pathways_as_strings.each do |line| 228 entry_id, name = line.split(/\s+/, 2) 229 hash[entry_id] = name 230 end 231 @rel_pathways_as_hash = hash 232 end 233 @rel_pathways_as_hash 234 end
Returns REL_PATHWAY field of the entry.
- Returns
-
Array containing String objects
# File lib/bio/db/kegg/pathway.rb 216 def rel_pathways_as_strings 217 lines_fetch('REL_PATHWAY') 218 end