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 36 def initialize(entry) 37 super(entry, TAGSIZE) 38 end
Public Instance Methods
comment()
click to toggle source
COMMENT
# File lib/bio/db/kegg/glycan.rb 118 def comment 119 field_fetch('COMMENT') 120 end
composition()
click to toggle source
COMPOSITION
# File lib/bio/db/kegg/glycan.rb 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()
click to toggle source
# File lib/bio/db/kegg/glycan.rb 76 def compounds 77 unless @data['COMPOUND'] 78 @data['COMPOUND'] = fetch('COMPOUND').split(/\s+/) 79 end 80 @data['COMPOUND'] 81 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 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 145 def dblinks_as_strings 146 unless @data['DBLINKS'] 147 @data['DBLINKS'] = lines_fetch('DBLINKS') 148 end 149 @data['DBLINKS'] 150 end
entry_id()
click to toggle source
ENTRY
# File lib/bio/db/kegg/glycan.rb 41 def entry_id 42 field_fetch('ENTRY')[/\S+/] 43 end
enzymes()
click to toggle source
# File lib/bio/db/kegg/glycan.rb 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()
click to toggle source
ATOM, BOND
# File lib/bio/db/kegg/glycan.rb 153 def kcf 154 return "#{get('NODE')}#{get('EDGE')}" 155 end
keggclass()
click to toggle source
CLASS
# File lib/bio/db/kegg/glycan.rb 71 def keggclass 72 field_fetch('CLASS') 73 end
mass()
click to toggle source
MASS
# File lib/bio/db/kegg/glycan.rb 63 def mass 64 unless @data['MASS'] 65 @data['MASS'] = field_fetch('MASS')[/[\d\.]+/].to_f 66 end 67 @data['MASS'] 68 end
name()
click to toggle source
NAME
# File lib/bio/db/kegg/glycan.rb 46 def name 47 field_fetch('NAME') 48 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 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 110 def orthologs_as_strings 111 unless @data['ORTHOLOGY'] 112 @data['ORTHOLOGY'] = lines_fetch('ORTHOLOGY') 113 end 114 @data['ORTHOLOGY'] 115 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 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 92 def pathways_as_strings 93 lines_fetch('PATHWAY') 94 end
reactions()
click to toggle source
# File lib/bio/db/kegg/glycan.rb 84 def reactions 85 unless @data['REACTION'] 86 @data['REACTION'] = fetch('REACTION').split(/\s+/) 87 end 88 @data['REACTION'] 89 end
references()
click to toggle source
REFERENCE
# File lib/bio/db/kegg/glycan.rb 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()
click to toggle source
REMARK
# File lib/bio/db/kegg/glycan.rb 123 def remark 124 field_fetch('REMARK') 125 end