class Bio::KEGG::DRUG
Description¶ ↑
Bio::KEGG::DRUG is a parser class for the KEGG DRUG database entry. KEGG DRUG is a drug information database.
References¶ ↑
Constants
- DELIMITER
- TAGSIZE
Public Class Methods
Creates a new Bio::KEGG::DRUG object.
Arguments:
-
(required) entry: (String) single entry as a string
- Returns
-
Bio::KEGG::DRUG object
# File lib/bio/db/kegg/drug.rb, line 45 def initialize(entry) super(entry, TAGSIZE) end
Public Instance Methods
Biological or chemical activity described in the ACTIVITY line.
- Returns
# File lib/bio/db/kegg/drug.rb, line 87 def activity field_fetch('ACTIVITY') end
COMMENT lines.
- Returns
# File lib/bio/db/kegg/drug.rb, line 123 def comment field_fetch('COMMENT') end
Returns a Hash of the DB name and an Array of entry IDs in DBLINKS field.
# File lib/bio/db/kegg/drug.rb, line 32 def dblinks_as_hash; super; end
List of database names and IDs, described in the DBLINKS lines.
- Returns
-
Array containing String objects
# File lib/bio/db/kegg/drug.rb, line 109 def dblinks_as_strings lines_fetch('DBLINKS') end
ID of the entry, described in the ENTRY line.
- Returns
# File lib/bio/db/kegg/drug.rb, line 52 def entry_id field_fetch('ENTRY')[/\S+/] end
Chemical formula described in the FORMULA line.
- Returns
# File lib/bio/db/kegg/drug.rb, line 73 def formula field_fetch('FORMULA') end
ATOM, BOND lines.
- Returns
# File lib/bio/db/kegg/drug.rb, line 116 def kcf return "#{get('ATOM')}#{get('BOND')}" end
Molecular weight described in the MASS line.
- Returns
-
Float
# File lib/bio/db/kegg/drug.rb, line 80 def mass field_fetch('MASS').to_f end
The first name recorded in the NAME field.
- Returns
# File lib/bio/db/kegg/drug.rb, line 66 def name names.first end
Names described in the NAME line.
- Returns
-
Array containing String objects
# File lib/bio/db/kegg/drug.rb, line 59 def names field_fetch('NAME').split(/\s*;\s*/) end
Returns a Hash of the pathway ID and name in PATHWAY field.
# File lib/bio/db/kegg/drug.rb, line 37 def pathways_as_hash; super; end
Product names described in the PRODUCTS lines.
- Returns
-
Array containing String objects
# File lib/bio/db/kegg/drug.rb, line 130 def products lines_fetch('PRODUCTS') end
REMARK lines.
- Returns
# File lib/bio/db/kegg/drug.rb, line 94 def remark field_fetch('REMARK') end