Class | Bio::KEGG::GLYCAN
In: | lib/bio/db/kegg/glycan.rb
Parent: | KEGGDB

### Methods

comment composition compounds dblinks dblinks_as_hash dblinks_as_strings entry_id enzymes kcf keggclass mass name new orthologs orthologs_as_hash orthologs_as_strings pathways pathways_as_hash pathways_as_strings reactions references remark

### Included Modules

Common::DblinksAsHash Common::PathwaysAsHash Common::OrthologsAsHash

### Constants

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

### Public Class methods

new(entry)

[Source]

        # File lib/bio/db/kegg/glycan.rb, line 36
    36:   def initialize(entry)
    37:     super(entry, TAGSIZE)
    38:   end

### Public Instance methods

comment()

COMMENT

[Source]

         # File lib/bio/db/kegg/glycan.rb, line 118
    118:   def comment
    119:     field_fetch('COMMENT')
    120:   end

composition()

COMPOSITION

[Source]

        # File lib/bio/db/kegg/glycan.rb, line 51
    51:   def composition
    52:     unless @data['COMPOSITION']
    53:       hash = Hash.new(0)
    54:       fetch('COMPOSITION').scan(/\((\S+)\)(\d+)/).each do |key, val|
    55:         hash[key] = val.to_i
    56:       end
    57:       @data['COMPOSITION'] = hash
    58:     end
    59:     @data['COMPOSITION']
    60:   end

compounds()

COMPOUND

[Source]

        # File lib/bio/db/kegg/glycan.rb, line 76
    76:   def compounds
    77:     unless @data['COMPOUND']
    78:       @data['COMPOUND'] = fetch('COMPOUND').split(/\s+/)
    79:     end
    80:     @data['COMPOUND']
    81:   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/glycan.rb, line 23
    23:   def dblinks_as_hash; super; end

dblinks_as_strings()

DBLINKS

[Source]

         # File lib/bio/db/kegg/glycan.rb, line 145
    145:   def dblinks_as_strings
    146:     unless @data['DBLINKS']
    147:       @data['DBLINKS'] = lines_fetch('DBLINKS')
    148:     end
    149:     @data['DBLINKS']
    150:   end

entry_id()

ENTRY

[Source]

        # File lib/bio/db/kegg/glycan.rb, line 41
    41:   def entry_id
    42:     field_fetch('ENTRY')[/\S+/]
    43:   end

enzymes()

ENZYME

[Source]

         # File lib/bio/db/kegg/glycan.rb, line 97
     97:   def enzymes
     98:     unless @data['ENZYME']
     99:       field = fetch('ENZYME')
    100:       if /\(/.match(field)      # old version
    101:         @data['ENZYME'] = field.scan(/\S+ \(\S+\)/)
    102:       else
    103:         @data['ENZYME'] = field.scan(/\S+/)
    104:       end
    105:     end
    106:     @data['ENZYME']
    107:   end

kcf()

ATOM, BOND

[Source]

         # File lib/bio/db/kegg/glycan.rb, line 153
    153:   def kcf
    154:     return "#{get('NODE')}#{get('EDGE')}"
    155:   end

keggclass()

CLASS

[Source]

        # File lib/bio/db/kegg/glycan.rb, line 71
    71:   def keggclass
    72:     field_fetch('CLASS')
    73:   end

mass()

MASS

[Source]

        # File lib/bio/db/kegg/glycan.rb, line 63
    63:   def mass
    64:     unless @data['MASS']
    65:       @data['MASS'] = field_fetch('MASS')[/[\d\.]+/].to_f
    66:     end
    67:     @data['MASS']
    68:   end

name()

NAME

[Source]

        # File lib/bio/db/kegg/glycan.rb, line 46
    46:   def name
    47:     field_fetch('NAME')
    48:   end

orthologs()

Alias for orthologs_as_hash

orthologs_as_hash()

Returns a Hash of the orthology ID and definition in ORTHOLOGY field.

[Source]

        # File lib/bio/db/kegg/glycan.rb, line 33
    33:   def orthologs_as_hash; super; end

orthologs_as_strings()

ORTHOLOGY

[Source]

         # File lib/bio/db/kegg/glycan.rb, line 110
    110:   def orthologs_as_strings
    111:     unless @data['ORTHOLOGY']
    112:       @data['ORTHOLOGY'] = lines_fetch('ORTHOLOGY')
    113:     end
    114:     @data['ORTHOLOGY']
    115:   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/glycan.rb, line 28
    28:   def pathways_as_hash; super; end

pathways_as_strings()

PATHWAY

[Source]

        # File lib/bio/db/kegg/glycan.rb, line 92
    92:   def pathways_as_strings
    93:     lines_fetch('PATHWAY')
    94:   end

reactions()

REACTION

[Source]

        # File lib/bio/db/kegg/glycan.rb, line 84
    84:   def reactions
    85:     unless @data['REACTION']
    86:       @data['REACTION'] = fetch('REACTION').split(/\s+/)
    87:     end
    88:     @data['REACTION']
    89:   end

references()

REFERENCE

[Source]

         # File lib/bio/db/kegg/glycan.rb, line 128
    128:   def references
    129:     unless @data['REFERENCE']
    130:       ary = Array.new
    131:       lines = lines_fetch('REFERENCE')
    132:       lines.each do |line|
    133:         if /^\d+\s+\[PMID/.match(line)
    134:           ary << line
    135:         else
    136:           ary.last << " #{line.strip}"
    137:         end
    138:       end
    139:       @data['REFERENCE'] = ary
    140:     end
    141:     @data['REFERENCE']
    142:   end

remark()

REMARK

[Source]

         # File lib/bio/db/kegg/glycan.rb, line 123
    123:   def remark
    124:     field_fetch('REMARK')
    125:   end

[Validate]