Class | Bio::KEGG::DRUG
In: | lib/bio/db/kegg/drug.rb
Parent: | KEGGDB

## Description

Bio::KEGG::DRUG is a parser class for the KEGG DRUG database entry. KEGG DRUG is a drug information database.

## References

- www.genome.jp/kegg/drug/

### Methods

activity comment dblinks dblinks_as_hash dblinks_as_strings entry_id formula kcf mass name names new pathways pathways_as_hash pathways_as_strings products remark

### Included Modules

Common::DblinksAsHash Common::PathwaysAsHash

### Constants

DELIMITER | = | RS = "\n///\n"
TAGSIZE | = | 12

### Public Class methods

new(entry)

Creates a new Bio::KEGG::DRUG object.

Arguments:

- (required) entry: (String) single entry as a string

Returns: | Bio::KEGG::DRUG object

[Source]

        # File lib/bio/db/kegg/drug.rb, line 45
    45:   def initialize(entry)
    46:     super(entry, TAGSIZE)
    47:   end

### Public Instance methods

activity()

Biological or chemical activity described in the ACTIVITY line.

Returns: | String

[Source]

        # File lib/bio/db/kegg/drug.rb, line 87
    87:   def activity
    88:     field_fetch('ACTIVITY')
    89:   end

comment()

COMMENT lines.

Returns: | String

[Source]

         # File lib/bio/db/kegg/drug.rb, line 123
    123:   def comment
    124:     field_fetch('COMMENT')
    125:   end

dblinks()

Alias for dblinks_as_hash

dblinks_as_hash()

Returns a Hash of the DB name and an Array of entry IDs in DBLINKS field.

[Source]

        # File lib/bio/db/kegg/drug.rb, line 32
    32:   def dblinks_as_hash; super; end

dblinks_as_strings()

List of database names and IDs, described in the DBLINKS lines.

Returns: | Array containing String objects

[Source]

         # File lib/bio/db/kegg/drug.rb, line 109
    109:   def dblinks_as_strings
    110:     lines_fetch('DBLINKS')
    111:   end

entry_id()

ID of the entry, described in the ENTRY line.

Returns: | String

[Source]

        # File lib/bio/db/kegg/drug.rb, line 52
    52:   def entry_id
    53:     field_fetch('ENTRY')[/\S+/]
    54:   end

formula()

Chemical formula described in the FORMULA line.

Returns: | String

[Source]

        # File lib/bio/db/kegg/drug.rb, line 73
    73:   def formula
    74:     field_fetch('FORMULA')
    75:   end

kcf()

ATOM, BOND lines.

Returns: | String

[Source]

         # File lib/bio/db/kegg/drug.rb, line 116
    116:   def kcf
    117:     return "#{get('ATOM')}#{get('BOND')}"
    118:   end

mass()

Molecular weight described in the MASS line.

Returns: | Float

[Source]

        # File lib/bio/db/kegg/drug.rb, line 80
    80:   def mass
    81:     field_fetch('MASS').to_f
    82:   end

name()

The first name recorded in the NAME field.

Returns: | String

[Source]

        # File lib/bio/db/kegg/drug.rb, line 66
    66:   def name
    67:     names.first
    68:   end

names()

Names described in the NAME line.

Returns: | Array containing String objects

[Source]

        # File lib/bio/db/kegg/drug.rb, line 59
    59:   def names
    60:     field_fetch('NAME').split(/\s*;\s*/)
    61:   end

pathways()

Alias for pathways_as_hash

pathways_as_hash()

Returns a Hash of the pathway ID and name in PATHWAY field.

[Source]

        # File lib/bio/db/kegg/drug.rb, line 37
    37:   def pathways_as_hash; super; end

pathways_as_strings()

List of KEGG Pathway IDs with short descriptions, described in the PATHWAY lines.

Returns: | Array containing String objects

[Source]

         # File lib/bio/db/kegg/drug.rb, line 102
    102:   def pathways_as_strings
    103:     lines_fetch('PATHWAY')
    104:   end

products()

Product names described in the PRODUCTS lines.

Returns: | Array containing String objects

[Source]

         # File lib/bio/db/kegg/drug.rb, line 130
    130:   def products
    131:     lines_fetch('PRODUCTS')
    132:   end

remark()

REMARK lines.

Returns: | String

[Source]

        # File lib/bio/db/kegg/drug.rb, line 94
    94:   def remark
    95:     field_fetch('REMARK')
    96:   end

[Validate]