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

new(entry) click to toggle source

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


Arguments:

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

Returns

Bio::KEGG::DRUG object

Calls superclass method Bio::NCBIDB::new
   # File lib/bio/db/kegg/drug.rb
45 def initialize(entry)
46   super(entry, TAGSIZE)
47 end

Public Instance Methods

activity() click to toggle source

Biological or chemical activity described in the ACTIVITY line.


Returns

String

   # File lib/bio/db/kegg/drug.rb
87 def activity
88   field_fetch('ACTIVITY')
89 end
comment() click to toggle source

COMMENT lines.


Returns

String

    # File lib/bio/db/kegg/drug.rb
123 def comment
124   field_fetch('COMMENT')
125 end
entry_id() click to toggle source

ID of the entry, described in the ENTRY line.


Returns

String

   # File lib/bio/db/kegg/drug.rb
52 def entry_id
53   field_fetch('ENTRY')[/\S+/]
54 end
formula() click to toggle source

Chemical formula described in the FORMULA line.


Returns

String

   # File lib/bio/db/kegg/drug.rb
73 def formula
74   field_fetch('FORMULA')
75 end
kcf() click to toggle source

ATOM, BOND lines.


Returns

String

    # File lib/bio/db/kegg/drug.rb
116 def kcf
117   return "#{get('ATOM')}#{get('BOND')}"
118 end
mass() click to toggle source

Molecular weight described in the MASS line.


Returns

Float

   # File lib/bio/db/kegg/drug.rb
80 def mass
81   field_fetch('MASS').to_f
82 end
name() click to toggle source

The first name recorded in the NAME field.


Returns

String

   # File lib/bio/db/kegg/drug.rb
66 def name
67   names.first
68 end
names() click to toggle source

Names described in the NAME line.


Returns

Array containing String objects

   # File lib/bio/db/kegg/drug.rb
59 def names
60   field_fetch('NAME').split(/\s*;\s*/)
61 end
pathways()
Alias for: pathways_as_hash
pathways_as_hash() click to toggle source

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

   # File lib/bio/db/kegg/drug.rb
37 def pathways_as_hash; super; end
Also aliased as: pathways
pathways_as_strings() click to toggle source

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


Returns

Array containing String objects

    # File lib/bio/db/kegg/drug.rb
102 def pathways_as_strings
103   lines_fetch('PATHWAY') 
104 end
products() click to toggle source

Product names described in the PRODUCTS lines.


Returns

Array containing String objects

    # File lib/bio/db/kegg/drug.rb
130 def products
131   lines_fetch('PRODUCTS')
132 end
remark() click to toggle source

REMARK lines.


Returns

String

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