Class: Bio::KEGG::ENZYME

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



20
21
22
# File 'lib/bio/db/kegg/enzyme.rb', line 20

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

Instance Method Details

#all_reacObject

ALL_REAC ‘;’



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

def all_reac
  field_fetch('ALL_REAC')
end

#classesObject

CLASS



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

def classes
  lines_fetch('CLASS')
end

#cofactorsObject

COFACTOR



95
96
97
# File 'lib/bio/db/kegg/enzyme.rb', line 95

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

#commentObject

COMMENT



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

def comment
  field_fetch('COMMENT')
end

DBLINKS



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

def dblinks
  lines_fetch('DBLINKS')
end

#diseasesObject

DISEASE



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

def diseases
  lines_fetch('DISEASE')
end

#entryObject

ENTRY



25
26
27
# File 'lib/bio/db/kegg/enzyme.rb', line 25

def entry
  field_fetch('ENTRY')
end

#entry_idObject



29
30
31
# File 'lib/bio/db/kegg/enzyme.rb', line 29

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

#genesObject

GENES



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

def genes
  lines_fetch('GENES')
end

#inhibitorsObject

INHIBITOR



90
91
92
# File 'lib/bio/db/kegg/enzyme.rb', line 90

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

#iubmb_reactionsObject



66
67
68
# File 'lib/bio/db/kegg/enzyme.rb', line 66

def iubmb_reactions
  all_reac.sub(/;\s*\(other\).*/, '').split(/\s*;\s*/)
end

#kegg_reactionsObject



70
71
72
73
74
75
76
77
# File 'lib/bio/db/kegg/enzyme.rb', line 70

def kegg_reactions
  reac = all_reac
  if reac[/\(other\)/]
    reac.sub(/.*\(other\)\s*/, '').split(/\s*;\s*/)
  else
    []
  end
end

#motifsObject

MOTIF



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

def motifs
  lines_fetch('MOTIF')
end

#nameObject



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

def name
  names.first
end

#namesObject

NAME



38
39
40
# File 'lib/bio/db/kegg/enzyme.rb', line 38

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

#obsolete?Boolean

Returns:

  • (Boolean)


33
34
35
# File 'lib/bio/db/kegg/enzyme.rb', line 33

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

#orthologsObject

ORTHOLOGY



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

def orthologs
  lines_fetch('ORTHOLOGY')
end

#pathwaysObject

PATHWAY



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

def pathways
  lines_fetch('PATHWAY')
end

#productsObject

PRODUCT



85
86
87
# File 'lib/bio/db/kegg/enzyme.rb', line 85

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

#reactionObject

REACTION



57
58
59
# File 'lib/bio/db/kegg/enzyme.rb', line 57

def reaction
  field_fetch('REACTION')
end

#structuresObject

STRUCTURES



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

def structures
  unless @data['STRUCTURES']
    @data['STRUCTURES'] = fetch('STRUCTURES').sub(/(PDB: )*/,'').split(/\s+/)
  end
  @data['STRUCTURES']
end

#substratesObject

SUBSTRATE



80
81
82
# File 'lib/bio/db/kegg/enzyme.rb', line 80

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

#sysnameObject

SYSNAME



52
53
54
# File 'lib/bio/db/kegg/enzyme.rb', line 52

def sysname
  field_fetch('SYSNAME')
end