Class: Bio::KEGG::ENZYME

Inherits:
Bio::KEGGDB show all
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

Methods inherited from DB

#exists?, #fetch, #get, open, #tags

Constructor Details

#initialize(entry) ⇒ ENZYME

Returns a new instance of ENZYME.



41
42
43
# File 'lib/bio/db/kegg/enzyme.rb', line 41

def initialize(entry)
  super(entry, TAGSIZE)
end

Instance Method Details

#all_reacObject

ALL_REAC ‘;’



83
84
85
# File 'lib/bio/db/kegg/enzyme.rb', line 83

def all_reac
  field_fetch('ALL_REAC')
end

#classesObject

CLASS



68
69
70
# File 'lib/bio/db/kegg/enzyme.rb', line 68

def classes
  lines_fetch('CLASS')
end

#cofactorsObject

COFACTOR



116
117
118
# File 'lib/bio/db/kegg/enzyme.rb', line 116

def cofactors
  field_fetch('COFACTOR').split(/\s*;\s*/)
end

#commentObject

COMMENT



121
122
123
# File 'lib/bio/db/kegg/enzyme.rb', line 121

def comment
  field_fetch('COMMENT')
end

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



161
162
163
# File 'lib/bio/db/kegg/enzyme.rb', line 161

def dblinks_as_strings
  lines_fetch('DBLINKS')
end

#diseasesObject

DISEASE



141
142
143
# File 'lib/bio/db/kegg/enzyme.rb', line 141

def diseases
  lines_fetch('DISEASE')
end

#entryObject

ENTRY



46
47
48
# File 'lib/bio/db/kegg/enzyme.rb', line 46

def entry
  field_fetch('ENTRY')
end

#entry_idObject



50
51
52
# File 'lib/bio/db/kegg/enzyme.rb', line 50

def entry_id
  entry[/EC (\S+)/, 1]
end

#genes_as_hashObject 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_stringsObject

GENES



136
137
138
# File 'lib/bio/db/kegg/enzyme.rb', line 136

def genes_as_strings
  lines_fetch('GENES')
end

#inhibitorsObject

INHIBITOR



111
112
113
# File 'lib/bio/db/kegg/enzyme.rb', line 111

def inhibitors
  field_fetch('INHIBITOR').split(/\s*;\s*/)
end

#iubmb_reactionsObject



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_reactionsObject



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

#motifsObject

MOTIF



146
147
148
# File 'lib/bio/db/kegg/enzyme.rb', line 146

def motifs
  lines_fetch('MOTIF')
end

#nameObject



63
64
65
# File 'lib/bio/db/kegg/enzyme.rb', line 63

def name
  names.first
end

#namesObject

NAME



59
60
61
# File 'lib/bio/db/kegg/enzyme.rb', line 59

def names
  field_fetch('NAME').split(/\s*;\s*/)
end

#obsolete?Boolean

Returns:

  • (Boolean)


54
55
56
# File 'lib/bio/db/kegg/enzyme.rb', line 54

def obsolete?
  entry[/Obsolete/] ? true : false
end

#orthologs_as_hashObject 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_stringsObject

ORTHOLOGY



131
132
133
# File 'lib/bio/db/kegg/enzyme.rb', line 131

def orthologs_as_strings
  lines_fetch('ORTHOLOGY')
end

#pathways_as_hashObject 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_stringsObject

PATHWAY



126
127
128
# File 'lib/bio/db/kegg/enzyme.rb', line 126

def pathways_as_strings
  lines_fetch('PATHWAY')
end

#productsObject

PRODUCT



106
107
108
# File 'lib/bio/db/kegg/enzyme.rb', line 106

def products
  field_fetch('PRODUCT').split(/\s*;\s*/)
end

#reactionObject

REACTION



78
79
80
# File 'lib/bio/db/kegg/enzyme.rb', line 78

def reaction
  field_fetch('REACTION')
end

#structuresObject

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

#substratesObject

SUBSTRATE



101
102
103
# File 'lib/bio/db/kegg/enzyme.rb', line 101

def substrates
  field_fetch('SUBSTRATE').split(/\s*;\s*/)
end

#sysnameObject

SYSNAME



73
74
75
# File 'lib/bio/db/kegg/enzyme.rb', line 73

def sysname
  field_fetch('SYSNAME')
end