Class: Bio::KEGG::ENZYME
- Inherits:
-
Bio::KEGGDB
- Object
- DB
- NCBIDB
- Bio::KEGGDB
- Bio::KEGG::ENZYME
- Includes:
- Common::DblinksAsHash, Common::GenesAsHash, Common::OrthologsAsHash, Common::PathwaysAsHash
- Defined in:
- lib/bio/db/kegg/enzyme.rb
Constant Summary collapse
- DELIMITER =
RS = "\n///\n"
- TAGSIZE =
12
Instance Method Summary collapse
-
#all_reac ⇒ Object
ALL_REAC ‘;’.
-
#classes ⇒ Object
CLASS.
-
#cofactors ⇒ Object
COFACTOR.
-
#comment ⇒ Object
COMMENT.
-
#dblinks_as_hash ⇒ Object
(also: #dblinks)
Returns a Hash of the DB name and an Array of entry IDs in DBLINKS field.
-
#dblinks_as_strings ⇒ Object
DBLINKS.
-
#diseases ⇒ Object
DISEASE.
-
#entry ⇒ Object
ENTRY.
- #entry_id ⇒ Object
-
#genes_as_hash ⇒ Object
(also: #genes)
Returns a Hash of the organism ID and an Array of entry IDs in GENES field.
-
#genes_as_strings ⇒ Object
GENES.
-
#inhibitors ⇒ Object
INHIBITOR.
-
#initialize(entry) ⇒ ENZYME
constructor
A new instance of ENZYME.
- #iubmb_reactions ⇒ Object
- #kegg_reactions ⇒ Object
-
#motifs ⇒ Object
MOTIF.
- #name ⇒ Object
-
#names ⇒ Object
NAME.
- #obsolete? ⇒ Boolean
-
#orthologs_as_hash ⇒ Object
(also: #orthologs)
Returns a Hash of the orthology ID and definition in ORTHOLOGY field.
-
#orthologs_as_strings ⇒ Object
ORTHOLOGY.
-
#pathways_as_hash ⇒ Object
(also: #pathways)
Returns a Hash of the pathway ID and name in PATHWAY field.
-
#pathways_as_strings ⇒ Object
PATHWAY.
-
#products ⇒ Object
PRODUCT.
-
#reaction ⇒ Object
REACTION.
-
#structures ⇒ Object
STRUCTURES.
-
#substrates ⇒ Object
SUBSTRATE.
-
#sysname ⇒ Object
SYSNAME.
Methods inherited from DB
#exists?, #fetch, #get, open, #tags
Constructor Details
Instance Method Details
#all_reac ⇒ Object
ALL_REAC ‘;’
83 84 85 |
# File 'lib/bio/db/kegg/enzyme.rb', line 83 def all_reac field_fetch('ALL_REAC') end |
#classes ⇒ Object
CLASS
68 69 70 |
# File 'lib/bio/db/kegg/enzyme.rb', line 68 def classes lines_fetch('CLASS') end |
#cofactors ⇒ Object
COFACTOR
116 117 118 |
# File 'lib/bio/db/kegg/enzyme.rb', line 116 def cofactors field_fetch('COFACTOR').split(/\s*;\s*/) end |
#comment ⇒ Object
COMMENT
121 122 123 |
# File 'lib/bio/db/kegg/enzyme.rb', line 121 def comment field_fetch('COMMENT') end |
#dblinks_as_hash ⇒ Object Also known as: dblinks
Returns a Hash of the DB name and an Array of entry IDs in DBLINKS field.
23 |
# File 'lib/bio/db/kegg/enzyme.rb', line 23 def dblinks_as_hash; super; end |
#dblinks_as_strings ⇒ Object
DBLINKS
161 162 163 |
# File 'lib/bio/db/kegg/enzyme.rb', line 161 def dblinks_as_strings lines_fetch('DBLINKS') end |
#diseases ⇒ Object
DISEASE
141 142 143 |
# File 'lib/bio/db/kegg/enzyme.rb', line 141 def diseases lines_fetch('DISEASE') end |
#entry ⇒ Object
ENTRY
46 47 48 |
# File 'lib/bio/db/kegg/enzyme.rb', line 46 def entry field_fetch('ENTRY') end |
#entry_id ⇒ Object
50 51 52 |
# File 'lib/bio/db/kegg/enzyme.rb', line 50 def entry_id entry[/EC (\S+)/, 1] end |
#genes_as_hash ⇒ Object Also known as: genes
Returns a Hash of the organism ID and an Array of entry IDs in GENES field.
38 |
# File 'lib/bio/db/kegg/enzyme.rb', line 38 def genes_as_hash; super; end |
#genes_as_strings ⇒ Object
GENES
136 137 138 |
# File 'lib/bio/db/kegg/enzyme.rb', line 136 def genes_as_strings lines_fetch('GENES') end |
#inhibitors ⇒ Object
INHIBITOR
111 112 113 |
# File 'lib/bio/db/kegg/enzyme.rb', line 111 def inhibitors field_fetch('INHIBITOR').split(/\s*;\s*/) end |
#iubmb_reactions ⇒ Object
87 88 89 |
# File 'lib/bio/db/kegg/enzyme.rb', line 87 def iubmb_reactions all_reac.sub(/;\s*\(other\).*/, '').split(/\s*;\s*/) end |
#kegg_reactions ⇒ Object
91 92 93 94 95 96 97 98 |
# File 'lib/bio/db/kegg/enzyme.rb', line 91 def kegg_reactions reac = all_reac if reac[/\(other\)/] reac.sub(/.*\(other\)\s*/, '').split(/\s*;\s*/) else [] end end |
#motifs ⇒ Object
MOTIF
146 147 148 |
# File 'lib/bio/db/kegg/enzyme.rb', line 146 def motifs lines_fetch('MOTIF') end |
#name ⇒ Object
63 64 65 |
# File 'lib/bio/db/kegg/enzyme.rb', line 63 def name names.first end |
#names ⇒ Object
NAME
59 60 61 |
# File 'lib/bio/db/kegg/enzyme.rb', line 59 def names field_fetch('NAME').split(/\s*;\s*/) end |
#obsolete? ⇒ Boolean
54 55 56 |
# File 'lib/bio/db/kegg/enzyme.rb', line 54 def obsolete? entry[/Obsolete/] ? true : false end |
#orthologs_as_hash ⇒ Object Also known as: orthologs
Returns a Hash of the orthology ID and definition in ORTHOLOGY field.
33 |
# File 'lib/bio/db/kegg/enzyme.rb', line 33 def orthologs_as_hash; super; end |
#orthologs_as_strings ⇒ Object
ORTHOLOGY
131 132 133 |
# File 'lib/bio/db/kegg/enzyme.rb', line 131 def orthologs_as_strings lines_fetch('ORTHOLOGY') end |
#pathways_as_hash ⇒ Object Also known as: pathways
Returns a Hash of the pathway ID and name in PATHWAY field.
28 |
# File 'lib/bio/db/kegg/enzyme.rb', line 28 def pathways_as_hash; super; end |
#pathways_as_strings ⇒ Object
PATHWAY
126 127 128 |
# File 'lib/bio/db/kegg/enzyme.rb', line 126 def pathways_as_strings lines_fetch('PATHWAY') end |
#products ⇒ Object
PRODUCT
106 107 108 |
# File 'lib/bio/db/kegg/enzyme.rb', line 106 def products field_fetch('PRODUCT').split(/\s*;\s*/) end |
#reaction ⇒ Object
REACTION
78 79 80 |
# File 'lib/bio/db/kegg/enzyme.rb', line 78 def reaction field_fetch('REACTION') end |
#structures ⇒ Object
STRUCTURES
151 152 153 154 155 156 |
# File 'lib/bio/db/kegg/enzyme.rb', line 151 def structures unless @data['STRUCTURES'] @data['STRUCTURES'] = fetch('STRUCTURES').sub(/(PDB: )*/,'').split(/\s+/) end @data['STRUCTURES'] end |
#substrates ⇒ Object
SUBSTRATE
101 102 103 |
# File 'lib/bio/db/kegg/enzyme.rb', line 101 def substrates field_fetch('SUBSTRATE').split(/\s*;\s*/) end |
#sysname ⇒ Object
SYSNAME
73 74 75 |
# File 'lib/bio/db/kegg/enzyme.rb', line 73 def sysname field_fetch('SYSNAME') end |