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
Bio::NCBIDB::new
# File lib/bio/db/kegg/drug.rb 45 def initialize(entry) 46 super(entry, TAGSIZE) 47 end
Public Instance Methods
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 lines.
- Returns
-
String
# File lib/bio/db/kegg/drug.rb 123 def comment 124 field_fetch('COMMENT') 125 end
Returns a Hash of the DB
name and an Array of entry IDs in DBLINKS field.
Bio::KEGG::Common::DblinksAsHash#dblinks_as_hash
# File lib/bio/db/kegg/drug.rb 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 109 def dblinks_as_strings 110 lines_fetch('DBLINKS') 111 end
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
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
ATOM, BOND lines.
- Returns
-
String
# File lib/bio/db/kegg/drug.rb 116 def kcf 117 return "#{get('ATOM')}#{get('BOND')}" 118 end
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
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 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
Returns a Hash of the pathway ID and name in PATHWAY
field.
Bio::KEGG::Common::PathwaysAsHash#pathways_as_hash
# File lib/bio/db/kegg/drug.rb 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 130 def products 131 lines_fetch('PRODUCTS') 132 end
REMARK lines.
- Returns
-
String
# File lib/bio/db/kegg/drug.rb 94 def remark 95 field_fetch('REMARK') 96 end