class Bio::KEGG::GLYCAN
Constants
- DELIMITER
- TAGSIZE
Public Class Methods
new(entry)
click to toggle source
Calls superclass method
Bio::NCBIDB.new
# File lib/bio/db/kegg/glycan.rb, line 36 def initialize(entry) super(entry, TAGSIZE) end
Public Instance Methods
comment()
click to toggle source
COMMENT
# File lib/bio/db/kegg/glycan.rb, line 118 def comment field_fetch('COMMENT') end
composition()
click to toggle source
COMPOSITION
# File lib/bio/db/kegg/glycan.rb, line 51 def composition unless @data['COMPOSITION'] hash = Hash.new(0) fetch('COMPOSITION').scan(/\((\S+)\)(\d+)/).each do |key, val| hash[key] = val.to_i end @data['COMPOSITION'] = hash end @data['COMPOSITION'] end
compounds()
click to toggle source
# File lib/bio/db/kegg/glycan.rb, line 76 def compounds unless @data['COMPOUND'] @data['COMPOUND'] = fetch('COMPOUND').split(/\s+/) end @data['COMPOUND'] end
dblinks_as_hash()
click to toggle source
Returns a Hash of the DB name and an Array of entry IDs in DBLINKS field.
Calls superclass method
Bio::KEGG::Common::DblinksAsHash#dblinks_as_hash
# File lib/bio/db/kegg/glycan.rb, line 23 def dblinks_as_hash; super; end
Also aliased as: dblinks
dblinks_as_strings()
click to toggle source
DBLINKS
# File lib/bio/db/kegg/glycan.rb, line 145 def dblinks_as_strings unless @data['DBLINKS'] @data['DBLINKS'] = lines_fetch('DBLINKS') end @data['DBLINKS'] end
entry_id()
click to toggle source
ENTRY
# File lib/bio/db/kegg/glycan.rb, line 41 def entry_id field_fetch('ENTRY')[/\S+/] end
enzymes()
click to toggle source
# File lib/bio/db/kegg/glycan.rb, line 97 def enzymes unless @data['ENZYME'] field = fetch('ENZYME') if /\(/.match(field) # old version @data['ENZYME'] = field.scan(/\S+ \(\S+\)/) else @data['ENZYME'] = field.scan(/\S+/) end end @data['ENZYME'] end
kcf()
click to toggle source
ATOM, BOND
# File lib/bio/db/kegg/glycan.rb, line 153 def kcf return "#{get('NODE')}#{get('EDGE')}" end
keggclass()
click to toggle source
CLASS
# File lib/bio/db/kegg/glycan.rb, line 71 def keggclass field_fetch('CLASS') end
mass()
click to toggle source
MASS
# File lib/bio/db/kegg/glycan.rb, line 63 def mass unless @data['MASS'] @data['MASS'] = field_fetch('MASS')[/[\d\.]+/].to_f end @data['MASS'] end
name()
click to toggle source
NAME
# File lib/bio/db/kegg/glycan.rb, line 46 def name field_fetch('NAME') end
orthologs_as_hash()
click to toggle source
Returns a Hash of the orthology ID and definition in ORTHOLOGY field.
Calls superclass method
Bio::KEGG::Common::OrthologsAsHash#orthologs_as_hash
# File lib/bio/db/kegg/glycan.rb, line 33 def orthologs_as_hash; super; end
Also aliased as: orthologs
orthologs_as_strings()
click to toggle source
# File lib/bio/db/kegg/glycan.rb, line 110 def orthologs_as_strings unless @data['ORTHOLOGY'] @data['ORTHOLOGY'] = lines_fetch('ORTHOLOGY') end @data['ORTHOLOGY'] end
pathways_as_hash()
click to toggle source
Returns a Hash of the pathway ID and name in PATHWAY field.
Calls superclass method
Bio::KEGG::Common::PathwaysAsHash#pathways_as_hash
# File lib/bio/db/kegg/glycan.rb, line 28 def pathways_as_hash; super; end
Also aliased as: pathways
pathways_as_strings()
click to toggle source
# File lib/bio/db/kegg/glycan.rb, line 92 def pathways_as_strings lines_fetch('PATHWAY') end
reactions()
click to toggle source
# File lib/bio/db/kegg/glycan.rb, line 84 def reactions unless @data['REACTION'] @data['REACTION'] = fetch('REACTION').split(/\s+/) end @data['REACTION'] end
references()
click to toggle source
REFERENCE
# File lib/bio/db/kegg/glycan.rb, line 128 def references unless @data['REFERENCE'] ary = Array.new lines = lines_fetch('REFERENCE') lines.each do |line| if /^\d+\s+\[PMID/.match(line) ary << line else ary.last << " #{line.strip}" end end @data['REFERENCE'] = ary end @data['REFERENCE'] end
remark()
click to toggle source
REMARK
# File lib/bio/db/kegg/glycan.rb, line 123 def remark field_fetch('REMARK') end