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, line 45
def initialize(entry)
  super(entry, TAGSIZE)
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, line 87
def activity
  field_fetch('ACTIVITY')
end
comment() click to toggle source

COMMENT lines.


Returns

String

# File lib/bio/db/kegg/drug.rb, line 123
def comment
  field_fetch('COMMENT')
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, line 52
def entry_id
  field_fetch('ENTRY')[/\S+/]
end
formula() click to toggle source

Chemical formula described in the FORMULA line.


Returns

String

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

ATOM, BOND lines.


Returns

String

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

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
name() click to toggle source

The first name recorded in the NAME field.


Returns

String

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

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
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, line 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, line 102
def pathways_as_strings
  lines_fetch('PATHWAY') 
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, line 130
def products
  lines_fetch('PRODUCTS')
end
remark() click to toggle source

REMARK lines.


Returns

String

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