Class | Bio::KEGG::KGML |
In: |
lib/bio/db/kegg/kgml.rb
|
Parent: | Object |
See www.genome.jp/kegg/xml/ for more details on KGML.
<entry>
:id -> :entry_id :type -> :category :map -> :pathway names() <graphics> :name -> :label :type -> :shape
<relation>
:entry1 -> :node1 :entry2 -> :node2 :type -> :rel <subtype> edge()
<reaction>
:name -> :entry_id :type -> :direction
file = File.read("kgml/hsa/hsa00010.xml") kgml = Bio::KEGG::KGML.new(file) # <pathway> attributes puts kgml.name puts kgml.org puts kgml.number puts kgml.title puts kgml.image puts kgml.link kgml.entries.each do |entry| # <entry> attributes puts entry.entry_id puts entry.name puts entry.category puts entry.link puts entry.reaction puts entry.pathway # <graphics> attributes puts entry.label # name puts entry.shape # type puts entry.x puts entry.y puts entry.width puts entry.height puts entry.fgcolor puts entry.bgcolor # <component> attributes puts entry.components # methood puts entry.names end kgml.relations.each do |relation| # <relation> attributes puts relation.node1 # entry1 puts relation.node2 # entry2 puts relation.rel # type # method puts relation.edge # <subtype> attributes puts relation.name puts relation.value end kgml.reactions.each do |reaction| # <reaction> attributes puts reaction.entry_id # name puts reaction.direction # type # <substrate> attributes reaction.substrates.each do |entry_id| puts entry_id # <alt> attributes altnames = reaction.alt[entry_id] altnames.each do |name| puts name end end # <product> attributes reaction.products.each do |entry_id| puts entry_id # <alt> attributes altnames = reaction.alt[entry_id] altnames.each do |name| puts name end end end
entries | [RW] | |
image | [R] | |
link | [R] | |
name | [R] | |
number | [R] | |
org | [R] | |
reactions | [RW] | |
relations | [RW] | |
title | [R] |