class Bio::KEGG::ORTHOLOGY

Description

KO (KEGG Orthology) entry parser.

References

Constants

DELIMITER
TAGSIZE

Public Class Methods

new(entry) click to toggle source

Reads a flat file format entry of the KO database.

Calls superclass method Bio::NCBIDB.new
# File lib/bio/db/kegg/orthology.rb, line 63
def initialize(entry)
  super(entry, TAGSIZE)
end

Public Instance Methods

definition() click to toggle source

Returns DEFINITION field of the entry.

# File lib/bio/db/kegg/orthology.rb, line 83
def definition
  field_fetch('DEFINITION')
end
entry_id() click to toggle source

Returns ID of the entry.

# File lib/bio/db/kegg/orthology.rb, line 68
def entry_id
  field_fetch('ENTRY')[/\S+/]
end
genes()
Alias for: genes_as_hash
genes_as_hash() click to toggle source

Returns a Hash of the organism ID and an Array of entry IDs in GENES field.

# File lib/bio/db/kegg/orthology.rb, line 38
def genes_as_hash; super; end
Also aliased as: genes
genes_as_strings() click to toggle source

Returns an Array of the organism ID and entry IDs in GENES field.

# File lib/bio/db/kegg/orthology.rb, line 126
def genes_as_strings
  lines_fetch('GENES')
end
keggclass() click to toggle source

Returns CLASS field of the entry.

# File lib/bio/db/kegg/orthology.rb, line 88
def keggclass
  field_fetch('CLASS')
end
keggclasses() click to toggle source

Returns an Array of biological classes in CLASS field.

# File lib/bio/db/kegg/orthology.rb, line 93
def keggclasses
  keggclass.gsub(/ \[[^\]]+/, '').split(/\] ?/)
end
modules()
Alias for: modules_as_hash
modules_as_hash() click to toggle source

Returns MODULE field as a Hash. Each key of the hash is KEGG MODULE ID, and each value is the name of the Pathway Module.


Returns

Hash

# File lib/bio/db/kegg/orthology.rb, line 52
def modules_as_hash; super; end
Also aliased as: modules
modules_as_strings() click to toggle source

Returns MODULE field of the entry.


Returns

Array containing String objects

# File lib/bio/db/kegg/orthology.rb, line 116
def modules_as_strings
  lines_fetch('MODULE')
end
name() click to toggle source

Returns NAME field of the entry.

# File lib/bio/db/kegg/orthology.rb, line 73
def name
  field_fetch('NAME')
end
names() click to toggle source

Returns an Array of names in NAME field.

# File lib/bio/db/kegg/orthology.rb, line 78
def names
  name.split(', ')
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/orthology.rb, line 43
def pathways_as_hash; super; end
Also aliased as: pathways
pathways_as_strings() click to toggle source

Pathways described in the PATHWAY field.


Returns

Array containing String

# File lib/bio/db/kegg/orthology.rb, line 100
def pathways_as_strings
  lines_fetch('PATHWAY')
end
pathways_in_keggclass() click to toggle source

OBSOLETE Do not use this method. Because KEGG ORTHOLOGY format is changed and PATHWAY field is added, older “pathways” method is renamed and remain only for compatibility.

Returns an Array of KEGG/PATHWAY ID in CLASS field.

# File lib/bio/db/kegg/orthology.rb, line 109
def pathways_in_keggclass
  keggclass.scan(/\[PATH:(.*?)\]/).flatten
end
references() click to toggle source

REFERENCE – Returns contents of the REFERENCE records as an Array of Bio::Reference objects.


Returns

an Array containing Bio::Reference objects

# File lib/bio/db/kegg/orthology.rb, line 60
def references; super; end