Class | Bio::KEGG::PATHWAY |
In: |
lib/bio/db/kegg/pathway.rb
|
Parent: | KEGGDB |
DELIMITER | = | RS = "\n///\n" |
TAGSIZE | = | 12 |
Creates a new Bio::KEGG::PATHWAY object.
Arguments:
Returns: | Bio::KEGG::PATHWAY object |
# File lib/bio/db/kegg/pathway.rb, line 72 72: def initialize(entry) 73: super(entry, TAGSIZE) 74: end
Compounds described in the COMPOUND lines.
Returns: | Hash of compound ID and its definition |
# 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
Diseases described in the DISEASE lines.
Returns: | Hash of disease ID and its definition |
# 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
Genes described in the GENE lines.
Returns: | Hash of gene ID and its definition |
# 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
Returns a Hash of the orthology ID and definition in ORTHOLOGY field.
# File lib/bio/db/kegg/pathway.rb, line 43 43: def orthologs_as_hash; super; end
Reactions described in the REACTION lines.
Returns: | Hash of reaction ID and its definition |
# 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
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 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: | Hash |
# 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