Class | Bio::KEGG::ORTHOLOGY
In: | lib/bio/db/kegg/orthology.rb
Parent: | KEGGDB

## Description

KO (KEGG Orthology) entry parser.

## References

- www.genome.jp/dbget-bin/get_htext?KO
- ftp.genome.jp/pub/kegg/genes/ko

### Methods

dblinks dblinks_as_hash dblinks_as_strings definition entry_id genes genes_as_hash genes_as_strings keggclass keggclasses modules modules_as_hash modules_as_strings name names new pathways pathways_as_hash pathways_as_strings pathways_in_keggclass references

### Included Modules

Common::DblinksAsHash Common::GenesAsHash Common::PathwaysAsHash Common::ModulesAsHash Common::References

### Constants

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

### Public Class methods

new(entry)

Reads a flat file format entry of the KO database.

[Source]

        # File lib/bio/db/kegg/orthology.rb, line 63
    63:   def initialize(entry)
    64:     super(entry, TAGSIZE)
    65:   end

### Public Instance methods

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/orthology.rb, line 33
    33:   def dblinks_as_hash; super; end

dblinks_as_strings()

Returns an Array of a database name and entry IDs in DBLINKS field.

[Source]

         # File lib/bio/db/kegg/orthology.rb, line 121
    121:   def dblinks_as_strings
    122:     lines_fetch('DBLINKS')
    123:   end

definition()

Returns DEFINITION field of the entry.

[Source]

        # File lib/bio/db/kegg/orthology.rb, line 83
    83:   def definition
    84:     field_fetch('DEFINITION')
    85:   end

entry_id()

Returns ID of the entry.

[Source]

        # File lib/bio/db/kegg/orthology.rb, line 68
    68:   def entry_id
    69:     field_fetch('ENTRY')[/\S+/]
    70:   end

genes()

Alias for genes_as_hash

genes_as_hash()

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

[Source]

        # File lib/bio/db/kegg/orthology.rb, line 38
    38:   def genes_as_hash; super; end

genes_as_strings()

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

[Source]

         # File lib/bio/db/kegg/orthology.rb, line 126
    126:   def genes_as_strings
    127:     lines_fetch('GENES')
    128:   end

keggclass()

Returns CLASS field of the entry.

[Source]

        # File lib/bio/db/kegg/orthology.rb, line 88
    88:   def keggclass
    89:     field_fetch('CLASS')
    90:   end

keggclasses()

Returns an Array of biological classes in CLASS field.

[Source]

        # File lib/bio/db/kegg/orthology.rb, line 93
    93:   def keggclasses
    94:     keggclass.gsub(/ \[[^\]]+/, '').split(/\] ?/)
    95:   end

modules()

Alias for modules_as_hash

modules_as_hash()

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

[Source]

        # File lib/bio/db/kegg/orthology.rb, line 52
    52:   def modules_as_hash; super; end

modules_as_strings()

Returns MODULE field of the entry.

Returns: | Array containing String objects

[Source]

         # File lib/bio/db/kegg/orthology.rb, line 116
    116:   def modules_as_strings
    117:     lines_fetch('MODULE')
    118:   end

name()

Returns NAME field of the entry.

[Source]

        # File lib/bio/db/kegg/orthology.rb, line 73
    73:   def name
    74:     field_fetch('NAME')
    75:   end

names()

Returns an Array of names in NAME field.

[Source]

        # File lib/bio/db/kegg/orthology.rb, line 78
    78:   def names
    79:     name.split(', ')
    80:   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/orthology.rb, line 43
    43:   def pathways_as_hash; super; end

pathways_as_strings()

Pathways described in the PATHWAY field.

Returns: | Array containing String

[Source]

         # File lib/bio/db/kegg/orthology.rb, line 100
    100:   def pathways_as_strings
    101:     lines_fetch('PATHWAY')
    102:   end

pathways_in_keggclass()

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.

[Source]

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

references()

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

Returns: | an Array containing Bio::Reference objects

[Source]

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

[Validate]