Class: Bio::KEGG::DRUG
- Inherits:
-
Bio::KEGGDB
- Object
- DB
- NCBIDB
- Bio::KEGGDB
- Bio::KEGG::DRUG
- Defined in:
- lib/bio/db/kegg/drug.rb
Constant Summary collapse
- DELIMITER =
RS = "\n///\n"
- TAGSIZE =
12
Instance Method Summary collapse
-
#activity ⇒ Object
ACTIVITY.
-
#comment ⇒ Object
COMMENT.
-
#dblinks ⇒ Object
DBLINKS.
-
#entry_id ⇒ Object
ENTRY.
-
#formula ⇒ Object
FORMULA.
-
#initialize(entry) ⇒ DRUG
constructor
A new instance of DRUG.
-
#kcf ⇒ Object
ATOM, BOND.
-
#mass ⇒ Object
MASS.
- #name ⇒ Object
-
#names ⇒ Object
NAME.
-
#pathways ⇒ Object
PATHWAY.
-
#remark ⇒ Object
REMARK.
Methods inherited from DB
#exists?, #fetch, #get, open, #tags
Constructor Details
Instance Method Details
#activity ⇒ Object
ACTIVITY
49 50 51 |
# File 'lib/bio/db/kegg/drug.rb', line 49 def activity field_fetch('ACTIVITY') end |
#comment ⇒ Object
COMMENT
59 60 61 |
# File 'lib/bio/db/kegg/drug.rb', line 59 def comment field_fetch('COMMENT') end |
#dblinks ⇒ Object
DBLINKS
69 70 71 |
# File 'lib/bio/db/kegg/drug.rb', line 69 def dblinks lines_fetch('DBLINKS') end |
#entry_id ⇒ Object
ENTRY
25 26 27 |
# File 'lib/bio/db/kegg/drug.rb', line 25 def entry_id field_fetch('ENTRY')[/\S+/] end |
#formula ⇒ Object
FORMULA
39 40 41 |
# File 'lib/bio/db/kegg/drug.rb', line 39 def formula field_fetch('FORMULA') end |
#kcf ⇒ Object
ATOM, BOND
74 75 76 |
# File 'lib/bio/db/kegg/drug.rb', line 74 def kcf return "#{get('ATOM')}#{get('BOND')}" end |
#mass ⇒ Object
MASS
44 45 46 |
# File 'lib/bio/db/kegg/drug.rb', line 44 def mass field_fetch('MASS').to_f end |
#name ⇒ Object
34 35 36 |
# File 'lib/bio/db/kegg/drug.rb', line 34 def name names.first end |
#names ⇒ Object
NAME
30 31 32 |
# File 'lib/bio/db/kegg/drug.rb', line 30 def names field_fetch('NAME').split(/\s*;\s*/) end |
#pathways ⇒ Object
PATHWAY
64 65 66 |
# File 'lib/bio/db/kegg/drug.rb', line 64 def pathways lines_fetch('DBLINKS') end |
#remark ⇒ Object
REMARK
54 55 56 |
# File 'lib/bio/db/kegg/drug.rb', line 54 def remark field_fetch('REMARK') end |